Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!elroy.jpl.nasa.gov!ncar!gatech!rutgers!netnews.upenn.edu!msuinfo!HEROUX@cemmva.cem.msu.edu From: heroux@cemmva.cem.msu.edu (Brett Heroux) Newsgroups: comp.editors Subject: Awk global empty line removal Message-ID: <00943646.E90E0D80@cemmva.cem.msu.edu> Date: 28 Jan 91 21:37:53 GMT Sender: news@msuinfo.cl.msu.edu Reply-To: heroux@cemmva.cem.msu.edu (Brett Heroux) Organization: MSU_Chemistry Lines: 14 This awk program doesn't print multiple adjacent blank lines, where blank has the loose definition of being nothing but spaces, tabs and a . NF != 0 { print; last = 0 } NF == 0 && last == 0 { print; last = 1 } You could mail me for invocation help, it's just awk -f programfile file Brett Heroux heroux@cemvax.cem.msu.edu "There are four kinds of people in this world: cretins, fools, morons, and lunatics... A normal person is just a reasonable mix of these components" -Umberto Eco