Re: Nano-and-Weird Blank Lines?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hart Larry wrote:
Well, back on January 08, 2008 Tim gave me a quite helpful command to get rid of blank lines, useing sed. Most times it works quite well, however, when I try-and-edit an article from the printer friendly version of Time Magazine, these sample supposedly blank lines will not go away.

The previous sed command can be tweaked:

  sed '/^[ \t*]*$/d' in_file.txt > out_file.txt

You can add characters to the set of characters to disregard. In the above, it's a space, a yab (\t) and an asterisk.

Or you can just use it as a pipe:

  lynx -dump http://example.com | sed '/^[ \t*]*$/d' > out.txt

-tim



_______________________________________________
Blinux-list mailing list
Blinux-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/blinux-list

[Index of Archives]     [Linux Speakup]     [Fedora]     [Linux Kernel]     [Yosemite News]     [Big List of Linux Books]