Path: utzoo!news-server.csri.toronto.edu!torsqnt!lethe!druid!darcy From: darcy@druid.uucp (D'Arcy J.M. Cain) Newsgroups: comp.unix.questions Subject: Re: Inserting Blank Line into File (sed/awk/?) Message-ID: <1991Mar17.194615.5693@druid.uucp> Date: 17 Mar 91 19:46:15 GMT References: <807@oss670.UUCP> <1991Mar15.190607.5061@convex.com> Organization: D'Arcy Cain Consulting, West Hill, Ontario Lines: 13 In article <1991Mar15.190607.5061@convex.com> Tom Christiansen writes: >From the keyboard of tkevans@oss670.UUCP (Tim Evans): >:I would like to be able to insert blank lines at regular intervals > awk '{ print; if (!(NR % 3)) print "\n" }' Nope. Either leave out the newline in the print statement or use printf instead of print. The way you have it you get 2 lines instead of one. -- D'Arcy J.M. Cain (darcy@druid) | D'Arcy Cain Consulting | There's no government Toronto, Ontario, Canada | like no government! +1 416 424 2871 |