[Info-vax] Removing blank lines from text files
Arne Vajhøj
arne at vajhoej.dk
Sat Jun 15 19:55:18 EDT 2019
On 6/15/2019 6:49 PM, Bob wrote:
> On Saturday, June 15, 2019 at 5:36:25 PM UTC-5, Craig A. Berry wrote:
>> There is a very simple solution and I've already posted it. Use any
>> language that supports regular expressions and print only lines that
>> match at least one non-whitespace character. In case you weren't paying
>> attention as usual, this is one extremely simple solution (again):
>>
>> $ perl -i -ne "print if /\S/" temp.txt
>
> Yup, that works too. Thanks!
The task at hand sounds perfect for Perl and (G)AWK.
Arne
More information about the Info-vax
mailing list