stumped... .

David Fleck david.fleck at mchsi.com
Sun Jan 18 05:45:11 PST 2004


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 at mchsi.com



More information about the freebsd-questions mailing list