in reply to Re: delete empty lines from a txt file
in thread delete empty lines from a txt file
Notice that broquaint also sneaked in the -n flag there. That's the one that actually sets up a loop that processes the file a line at a time.
And just to be obtuse, I'd write it like this:
--perl -i.bak -ne 'print if /\S/' your_file.txt
"The first rule of Perl club is you don't talk about Perl club."
|
|---|