Inserting Blank Line into File (sed/awk/?)
Jonathan I. Kamens
jik at athena.mit.edu
Sat Mar 16 04:31:05 AEST 1991
In article <807 at oss670.UUCP>, tkevans at oss670.UUCP (Tim Evans) writes:
|> I would like to be able to insert blank lines at regular intervals
|> in a structured file. Specifically, I want to place a blank line after
|> every third line in my input file. Every third line in the input file
|> begins with a specific character string.
awk '{print} NR % 3 == 0 {print ""}'
--
Jonathan Kamens USnail:
MIT Project Athena 11 Ashford Terrace
jik at Athena.MIT.EDU Allston, MA 02134
Office: 617-253-8085 Home: 617-782-0710
More information about the Comp.unix.questions
mailing list