From: nobuyoshi nakada Date: 2005-10-13T10:43:58+09:00 Subject: Re: Removing blank lines Hi, At Thu, 13 Oct 2005 03:26:52 +0900, basi wrote in [ruby-talk:160238]: > How does one delete blank lines from a text file? (I did try a number > of things, but, I can't get any to work.) grep -v ^$ infile > outfile To remove also lines contain whitespaces only: grep -v '^[ ]*$' infile > outfile -- Nobu Nakada