Xref: utzoo comp.unix.shell:2063 comp.lang.perl:5116 Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!wuarchive!uwm.edu!linac!att!ucbvax!iwarp.intel.com!news From: merlyn@iwarp.intel.com (Randal L. Schwartz) Newsgroups: comp.unix.shell,comp.lang.perl Subject: Re: deleting some empty lines with sed Summary: WATCH the Newsgroups line!! Message-ID: <1991Apr29.054020.15066@iwarp.intel.com> Date: 29 Apr 91 05:40:20 GMT References: <1991Apr27.143519.26256@daimi.aau.dk> Sender: news@iwarp.intel.com Reply-To: merlyn@iwarp.intel.com (Randal L. Schwartz) Followup-To: comp.unix.shell Organization: Stonehenge; netaccess via Intel, Beaverton, Oregon, USA Lines: 15 In-Reply-To: datpete@daimi.aau.dk (Peter Andersen) In article <1991Apr27.143519.26256@daimi.aau.dk>, datpete@daimi (Peter Andersen) writes: | Does anyone have a way of doing this, perhaps using something | else but sed. I'm not a perl-guru, but if its possible in perl | I'd like to hear about that too. perl -ne 'print unless /\S/ ? ($skip = 0) : $skip++' out How this works is left as an exercise to the reader. :-) print "Just another Perl hacker," unless $skip # :-) -- /=Randal L. Schwartz, Stonehenge Consulting Services (503)777-0095 ==========\ | on contract to Intel's iWarp project, Beaverton, Oregon, USA, Sol III | | merlyn@iwarp.intel.com ...!any-MX-mailer-like-uunet!iwarp.intel.com!merlyn | \=Cute Quote: "Intel: putting the 'backward' in 'backward compatible'..."====/