|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 operator
d|D echo "Enter the last name of the record to be deleted: \c"
if [ cut -d: -f1 asg51fin > delete ] ; then
[ grep -v '$lastname' delete asg51fin ]
echo "Record was deleted"
echo "Record was not found"