[Info-vax] Removing blank lines from text files
Jon Pinkley
jon.pinkley at gmail.com
Sat Jun 15 00:12:06 EDT 2019
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?
>
> I can obviously write a small DCL script to read the file, and write the non blank lines, but I'm wondering if there is an easier way.
>
> Thanks;
>
> Bob
It depends what you mean by blank line. If you mean lines with zero length, then
$ search input /out=output "" /form=pass
will write all lines that contain at least a single byte to the output (at least on Alpha 8.3), but it won't remove lines with only whitespace.
Andy Goldstein could probably provide a teco one-liner to do it.
More information about the Info-vax
mailing list