Path: utzoo!attcan!uunet!husc6!bloom-beacon!oberon!sm.unisys.com!hplabs!hpda!hpcupt1!hpsal2!morrell From: morrell@hpsal2.HP.COM (Michael Morrell) Newsgroups: comp.unix.questions Subject: Re: Re: sed script to combine blank lines? (sed + awk solutions) Message-ID: <14660005@hpsal2.HP.COM> Date: 18 Oct 88 06:04:52 GMT References: <1527@solo9.cs.vu.nl> Organization: HP System Architecture Lab, Cupertino Lines: 14 / hpsal2:comp.unix.questions / dave@lsuc.uucp (David Sherman) / 3:49 pm Oct 16, 1988 / Some versions of UNIX (including 4.1BSD) include a program call ssp(1) which does this; it's a bit faster than the parallel awk script. Also, if you know your text doesn't contain duplicate lines (nroff output almost always qualifies, for example), good old uniq(1) will do it. ---------- I thought the original problem was to replace multiple "blank" lines with a single newline (\n), where "blank" included lines with only tabs and formfeeds on them. ssp and uniq will only help if the lines to be combined are really blank.