See following example:

$ cat foo.sh
u=root
echo ~$u
$ bash foo.sh  # bash 4.2.37
~root
$ ksh foo.sh  # ksh 93u+ 2012-08-01
/root
$

I think bash behavior is correct according to
http://pubs.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html#tag_02_06which
says tilde expansion should be done before parameter expansion.
_______________________________________________
ast-users mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-users

Reply via email to