in reply to Re: grep and delete
in thread grep and delete
Here's another one-liner that doesn't use a begin block:
perl -ni.bak -e "print; /word/ && last;" file.txt
When the thought came to me, I was surprised at how simple the solution turned out to be.
Dave
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: grep and delete
by BrowserUk (Patriarch) on Jan 21, 2006 at 07:48 UTC | |
by davido (Cardinal) on Jan 21, 2006 at 16:31 UTC |