Well i am really stuck at this one.
I have dirs.txt which is as follows:
/var/tmp/old files.txt
/var/tmp/old backups.bak
dirs.txt file is generated by the script itself.
When i want to use dirs.txt in a for loop like:
for dir in `cat dirs.txt` ; do
ls -al $dir
done
Here is what the command throws: ls: cannot access /var/tmp/old: No such file or directory
I want the whole filenames to be ls -al'ed but it tries to ls -al /var/tmp/old
How may i correct this from the for loop?