Forum Moderators: bakedjake
If there is no file with that name
Print error message (File not found)
Otherwise
Ask if the user wants to delete the file
Read the user's choice (y/n)
If the choice is yes (y)
Remove the file and print a message
(File removed)
PLEASE HELP DUE MONDAY HERE'S A MY SCRIPT:
echo "Deleting a file Interactively"
echo
sleep 2
echo "Enter a filename:\c"
read answer
if [ "filename" ]
then
echo "Are you sure you want to delete this file?"
fi
echo "Input y for yes or no for no:\c"
read answer
if test "answer" = y
then
echo "File removed"
else
echo "File not Removed"
fi
echo
exit 0