Hi there,
I'm wondering how I can run a script that would loop and launch a command that would take as parameter every line in a file one by one.
For example, say I want to remove a list of files:
~$ cat filestoremove
foo
bar
~$ cat myscript
for file in filestoremove; do
rm $file
done
Unfortunately, it doesn't work. Instead, it remove the file that contains the list of file to remove.
Can you help me with that?
Thanks in advance
Santiago