I have a file called ‘removethese’ who’s contents looks like this:
./test_dir/file1
./test_dir/file2
./test_dir/file 3test
./test_dir/file4 test
I’m trying to remove each one of them in a for loop like this:
for file in `cat removelist`; do rm -v "$file"; done
The whitespace in the filenames seems to mess this up. How can I get around this?
Works in bash:
i.e. if the files have the correct properties etc.