in reply to •Re: perl -pie "???"
in thread perl -pie "???"
perl -0777 -pe's/^.*\n//' any number of files
This won't work correctly on files with a single line and no terminating newline, though. If that is a concern, the following is necessary:
perl -0777 -pe's/^.*(?:\n|\z)//' any number of files
I really wish there was a metacharacter for "either newline or end of string" as the counterpart to $ — this isn't the first time it would have been handy.
Makeshifts last the longest.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: perl -pie "???"
by Anonymous Monk on Aug 18, 2004 at 14:16 UTC |