script
Daniel Hedlund
daniel at digitree.org
Mon May 22 07:06:32 UTC 2006
Kaushal,
> va=`cut -d"/" -f2 out`
> cd $va
>
> The issue is that it doesnot cd to the directory after running the
> script means
> cd sab.
Do you have any spaces in any of the directories that you're trying to
cd to? If so, this could be your problem; you'll need to escape the
variable (cd "$va" for example). This isn't the best way to handle
escaped characters but works as long as filenames don't have any
quotation marks in them. How are you generating the file "out"? If
it's using a command like 'ls', you can add "-Q" or "--quote-name" to
the command which will automatically escape the paths.
Cheers,
Daniel Hedlund
daniel at digitree.org
More information about the fedora-list
mailing list