bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Tilde expansion differences between 4.3 and 4.2


From: Greg Wooledge
Subject: Re: Tilde expansion differences between 4.3 and 4.2
Date: Wed, 14 Jan 2015 09:19:48 -0500
User-agent: Mutt/1.4.2.3i

On Wed, Jan 14, 2015 at 03:09:47PM +0100, Ondrej Oprala wrote:
> echo "${PWD/#$HOME/~}"
> 
> Result of echo in 4.3:
> /home/<user>/MYDIR

imadev:~/tmp$ echo "$BASH_VERSION -- ${PWD/#$HOME/\~}"
4.3.30(5)-release -- ~/tmp

imadev:~/tmp$ bash-4.2 -c 'echo "$BASH_VERSION -- ${PWD/#$HOME/\~}"'
4.2.46(1)-release -- \~/tmp

imadev:~/tmp$ t="~"; echo "$BASH_VERSION -- ${PWD/#$HOME/$t}"
4.3.30(5)-release -- ~/tmp

imadev:~/tmp$ bash-4.2 -c 't="~"; echo "$BASH_VERSION -- ${PWD/#$HOME/$t}"'
4.2.46(1)-release -- ~/tmp



reply via email to

[Prev in Thread] Current Thread [Next in Thread]