in reply to script for removing certain text
perl -nie "print unless /begin/../end/" file1 file2
Of course, the details of quoting, etc. are up to your shell (like for instance, you'd use " instead of ' under Windows shells).
If you want backup files to be made, do this:
perl -ni.bak -e "print unless /begin/../end/" file1 file2
This will make backup files that are named file1.bak and so on.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: script for removing certain text
by Anonymous Monk on Jun 29, 2001 at 19:39 UTC |