bug-bash
[Top][All Lists]
Advanced

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

Bash and cd


From: Rue U
Subject: Bash and cd
Date: Sun, 11 Apr 2010 14:56:38 -0400

The "cd" command/program doesnt work with paths stored in a variable.

If the variable contains the backslash.

Such as:


var=/media/New\ Folder\ Here/

cd $var
bash: cd: /tmp/New: No such file or directory

echo $var
/tmp/New Folder Here/

OKAY FAIR ENOUGH. NOT ESCAPED. Now let me add some escapes!
-----------------------------------------------------------------------------

var="/tmp/New\ Folder\ Here/"

cd $var
bash: cd: /tmp/New\: No such file or directory

It stops right at the first escape.




Is there a solution to this? Thanks









reply via email to

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