Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!crdgw1!uunet!rbj From: rbj@uunet.UU.NET (Root Boy Jim) Newsgroups: comp.unix.questions Subject: Re: Inserting Blank Line into File (sed/awk/?) Message-ID: <126604@uunet.UU.NET> Date: 28 Mar 91 01:27:13 GMT References: <807@oss670.UUCP> <3085@inews.intel.com> Organization: UUNET Communications Services, Falls Church, VA Lines: 17 >In article ed@lvw6.lvw.loral.com (Ed Allen) writes: >>Now for the 'sed' solution.... >>sed -n -e '{N;N;p;a\ >> >>}' filename Most of it anyway. Works if the number of lines is a multiple of three. Extra line or two gets eaten. Anyway, here's a single line solution without the same bug: sed -n -e '$p;N;$p;N;h;s/.*//;H;x;p' I think TC is right about avoiding sed in cases like this. -- [rbj@uunet 1] stty sane unknown mode: sane