Re: script

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

 



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@xxxxxxxxxxxx


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux