Getting a text file rid of all superfluous blank lines

Mike McCarty mike.mccarty at sbcglobal.net
Thu Dec 1 23:53:34 UTC 2005


Paul Smith wrote:
> On 12/1/05, Les Mikesell <lesmikesell at gmail.com> wrote:
> 
>>>>sed -e 's;^\w*$;;' file-to-clean | grep -v '^$'
>>>
>>>Why not use egrep to do it in one pass? Something like:
>>>
>>>egrep -v '^\w*$' file-to-clean
>>
>>Neither of these leave any blank lines.  The idea was
>>to collapse repeated blank lines or lines containing only
>>white space to one.
> 
> 
> So many ways of solving my problem show that this list is quite creative!
> 
> Paul
> 

Do you have gcc installed on your system?

Mike
-- 
p="p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);}
This message made from 100% recycled bits.
You have found the bank of Larn.
I can explain it for you, but I can't understand it for you.
I speak only for myself, and I am unanimous in that!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: noblank.c
Type: text/x-csrc
Size: 965 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/fedora-list/attachments/20051201/2ffd0286/attachment-0001.bin>


More information about the fedora-list mailing list