[Info-vax] Removing blank lines from text files

Simon Clubley clubley at remove_me.eisner.decus.org-Earth.UFP
Mon Jun 17 08:17:53 EDT 2019


On 2019-06-15, Arne Vajhøj <arne at vajhoej.dk> wrote:
> 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.
>

Would a regex pattern in grep work as well ?

VMS _really_ needs native regex support in its tools...

Simon.

-- 
Simon Clubley, clubley at remove_me.eisner.decus.org-Earth.UFP
Microsoft: Bringing you 1980s technology to a 21st century world



More information about the Info-vax mailing list