Removing Blank Lines

Nikolas Britton freebsd at nbritton.org
Thu Dec 30 05:19:00 PST 2004


Removing Blank or Empty Lines from a text file. Just posting this so I 
don't forget it, the last link and perl script is the one that worked btw:

http://www.itworld.com/nl/unix_sys_adm/06272001/
http://unix.t-a-y-l-o-r.com/VMblank.html
http://groups-beta.google.com/group/comp.lang.perl.misc/browse_thread/thread/6521c310c7b32940/d4910450d920f281

perl -i.bak -ne "print if /\S/" file


More information about the freebsd-newbies mailing list