[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: behaviour change between 4.2/4.3 with tilde
From: |
Andreas Schwab |
Subject: |
Re: behaviour change between 4.2/4.3 with tilde |
Date: |
Wed, 22 Oct 2014 14:45:11 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
Hanno Böck <hanno@hboeck.de> writes:
> This is a reduced sample:
> export a='x'; echo "${a/x/~}"
>
> On bash 4.3 this will result in the user's homedir path. On 4.2 this
> will result in a ~.
> If one wants to get a "~" char there seems no easy portable way to do
> so. Using escaping with \~ works in 4.3, but not in 4.2.
t='~'; echo "${a/x/$t}"
Andreas.
--
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."