Hello forum members,
I am writing a script to two tasks.
1: displaying the list of the files in the current directory.
2: removing the specifed file from the list.
I have written a sample script ,so can u please verfiy and correct.
echo Enter list of files
ls *.txt
read textfile
rm -f $textfile
if [ $textfile ]
then
echo failed to remove file.
else
echo removed sucessfully.
fi
I am looking forward from you.......ASAP.
Advance thanks,
Siva Ranganath CH.