Tiny Core Linux
Tiny Core Extensions => TCE Talk => Topic started by: PingPing on June 05, 2009, 04:31:43 AM
-
I'm new bash scripting and need some advice.
I'm working on a remaster script that downloads a tce, extracts it and then consults a file ('remove_file_list') and removes files listed in that list.
The current script snippet is:for FILE in `cat ../remove_file_list`
do
rm -rf $FILE
done
I now want to amend the script so that I can insert comment lines (ie. all beginning with #) in remove_file_list and these lines will be ignored by the above script.
How do I do this?
-
`cat ../remove_file_list | grep -v '^#'`
-
Duh! **bangs head against wall**.
Thanks.