You're replying to a comment by Yogesh Agrawal.

February 11, 2009, 08:07

HI Peteris,
Regarding #52 correction. I got one thing.
If our awk command is like this it will work perfectly.
awk 'var-->0;/foo/{var=1}' file

I gave input file as:

baz
foo
foo
foo
bar
foo
baz

and got output as:
foo
foo
bar
baz
which is correct as per definition.

You may find loophole in this. But till then it is working perfect.
Thanks
yogesh

Reply To This Comment

(why do I need your e-mail?)

(Your twitter name, if you have one. (I'm @pkrumins, btw.))

Type the word "sandbox": (just to make sure you're a human)

Please preview the comment before submitting to make sure it's OK.