Am 07.03.2014 22:58, schrieb s...@missionstclare.com:
I have some text files from which I would like to remove the first line,
but only if it's blank. Any hints? I tried a few things, but the
results haven't quite been satisfactory.
perl -pi -e '$_ = "" if ( $. == 1 && /^\n/);' filename
on c
On Mar 7, 2014, at 1:58 PM, s...@missionstclare.com wrote:
> I have some text files from which I would like to remove the first line, but
> only if it's blank. Any hints? I tried a few things, but the results haven't
> quite been satisfactory.
You should be able to do that in just a few lines
I have some text files from which I would like to remove the first
line, but only if it's blank. Any hints? I tried a few things, but
the results haven't quite been satisfactory.
Thanks!
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h