
24 Jul
2025
24 Jul
'25
1:53 a.m.
On Tue, Jul 22, 2025 at 02:23:04PM +0200, Hécate via Haskell-Cafe wrote:
With GNU bash, version 5.2.37(1)-release, `~foo` (provided that foo is a user) is indeed expanded to the user's home directory.
Ditto in "zsh" (largely bash-compatible) on MacOS: % echo ~/Library /Users/viktor/Library % echo ~admin/Library /Users/admin/Library And both /bin/sh and /bin/csh on NetBSD: $ echo ~root/.profile ~postfix/public /root/.profile /var/spool/postfix/public So "~" expansion is quite common in modern Unix shells. -- Viktor. 🇺🇦 Слава Україні!