bug-bash
[Top][All Lists]
Advanced

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

invoke tilde expansion on quoted string


From: Peng Yu
Subject: invoke tilde expansion on quoted string
Date: Fri, 11 Nov 2011 23:42:16 -0600

Hi,

I know from the document that tilde expansion only works if the string
is unquoted (see below)

~$ cd '~/..'
-bash: cd: ~/..: No such file or directory
~$ cd ~/..
/Users$

I'm wondering if I already have a string variable, is there a bash
native to do tilde expansion on it.

var='~/..'
cd $var#how to change this line?

-- 
Regards,
Peng



reply via email to

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