Core iTOps Tube

Wednesday, 9 May 2012

Delete a line containing a string from user input

I have code that accepts input from a user, and when the user hits enter it is supposed to delete that whole line from the file.

echo "Which record? "

read record

sed '/$record/d' file

However, it does not delete it. Any help?

No comments:

Post a Comment