[Info-vax] Removing blank lines from text files

Craig A. Berry craigberry at nospam.mac.com
Sat Jun 15 09:12:12 EDT 2019


On 6/14/19 11:12 PM, Jon Pinkley wrote:
> On Friday, June 14, 2019 at 9:55:51 PM UTC-4, Bob wrote:
>> Is there some simple DCL command, or a few commands, that I can use to remove blank lines from a file?

> Andy Goldstein could probably provide a teco one-liner to do it.

But anyone can do it with a Perl one-liner:

$ type temp.txt
abc

def

ghi
$ perl -i -ne "print if /\S/" temp.txt
$ type temp.txt
abc
def
ghi






More information about the Info-vax mailing list