Code Comments
Programming Forum and web based access to our favorite programming groups.
sammy wrote:
> Below works for each line but I would like every second line a space.
>
> awk '{print;print ""}' filname
>
> What I would like is below:
>
> start of day
> end of day
>
> start of day
> end of day
>
> Also I'd like to use a search critera as an option also ie search for say
> start and then print next two lines and have a space ie same
> as above output but using search. Something like below that does not work.
>
> awk '/start/ {print;print ""}'
>
awk '/start/{c=3}--c>=1;c==1{print "";c=0}'
Ed.
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.