#!/bin/sh
filenames=`awk ' { print $8 }' filename`
for all in $filenames
do
if [ -f "$all" ] ; then
echo "Removing $all."
rm $PWD/$all || echo "Could not remove filename $all."
fi
done
If you want to delete files with spaces or names like "-t" then this simple method works well too. You might want to try {system( "rm -i -- \"" $0 "\"" )} if you worry about deleting the wrong files. These kinds of scripts are scary.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.