I have created a menu and I am trying to create a script that deletes lines (records) from a file (asg51fin) . when d|D is selected dethe script should prompt for the name and delete the entire line from the file. this is the code I have thus far but it does not work. I
keep getting the following error message.
-d:: unknown test operatord|D echo "Enter the last name of the record to be deleted: \c"
read $lastname
if [ cut -d: -f1 asg51fin > delete ] ; then
[ grep -v '$lastname' delete asg51fin ]
echo "Record was deleted"
else
echo "Record was not found"
fi ;;
Yes (14) | ![]() | |
No (14) | ![]() | |
I don't know (15) | ![]() |