Re: Getting a text file rid of all superfluous blank lines

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

 



On Thu, 2005-12-01 at 16:18, Kenneth Porter wrote:
> --On Thursday, December 01, 2005 1:38 PM -0700 Guy Fraser 
> <guy@xxxxxxxxxxxx> 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.

-- 
  Les Mikesell
   lesmikesell@xxxxxxxxx



[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux