On Wed, Jun 01, 2016 at 04:57:46PM +0200, Ángel González wrote: > On 2016-06-01 at 10:40 -0400, Greg Wooledge wrote: > > On Wed, Jun 01, 2016 at 03:33:23PM +0200, Christian wrote: > > > sh and zsh both return the expected x=~ > > > > > > sh -c "echo x=~" > > > > > > x=~ > > > > imadev:~$ bash -c 'echo x=~' > > x=/net/home/wooledg > > imadev:~$ bash -posix -c 'echo x=~' > > x=~ > > Even if it's a bash extension, it should be documented. Christian is > right in that it's an unexpected behavior.
It's documented (in reverse, by saying that POSIX mode *doesn't* do it) at http://tiswww.case.edu/~chet/bash/POSIX which in turn is referenced in the SEE ALSO section of the man page.