Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 18 Jan 2004 07:45:09 -0600 (CST)
From:      David Fleck <david.fleck@mchsi.com>
To:        Rob <listone@deathbeforedecaf.net>
Cc:        FreeBSD Mailing List <freebsd-questions@freebsd.org>
Subject:   Re: stumped... .
Message-ID:  <20040118074234.J602@grond.sourballs.org>
In-Reply-To: <007d01c3dd7d$d0917530$a4b826cb@goo>
References:  <20040118030911.GA18161@tao.thought.org> <20040117215110.R602@grond.sourballs.org> <007d01c3dd7d$d0917530$a4b826cb@goo>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 18 Jan 2004, Rob wrote:
> David Fleck wrote on Sunday January 18, 2004:
> > Well, you didn't mention awk, but...
> >
> >
> > awk '$0 ~ /^PATTERN/ {x=1}; {if (x!=1) print $0}' < foo > bar
>
> Wouldn't it be neater to do
>
>   nawk '/^PATTERN/ { exit } ; { print }'
>
> ?

Why, yes, it would.  'awk' works with that, as well.

What does 'nawk' do that 'awk' doesn't?  I've got both binaries on my
system, but the nawk manpage is just a link to awk(1).

--
David Fleck
david.fleck@mchsi.com



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040118074234.J602>