The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #4 (permalink)  
Old 08-26-2005
bakunin bakunin is offline Forum Staff  
Bughunter Extraordinaire
  
 

Join Date: May 2005
Location: In the leftmost byte of /dev/kmem
Posts: 1,628
in case the "empty" lines might contain blank characters:

grep -v '^[<spc><tab>]*$' Yourfile > correctfile

or (this one's for RishiPahuja):

sed '/^[<spc><tab>]*$/d' Yourfile > correctfile

(replace "<spc>" and "<tab>" with space and tab characters)
bakunin