in reply to How can I find and delete a line from a file?
Here's a command-line one-liner:
perl -p -i.bak -e "next if /^sandwich,hamburger,/" comma.file
You could wrap this in a batch script or shell alias to facilitate the substitution of parameter values.
Alternatively:
perl -n -i.bak -e "print unless /^sandwich,hamburger,/" comma.file
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Answer: How can I find and delete a line from a file?
by slvrstn (Initiate) on Oct 28, 2008 at 02:00 UTC |