From owner-freebsd-questions@FreeBSD.ORG Sun Jan 18 05:45:11 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 780D216A4CE for ; Sun, 18 Jan 2004 05:45:11 -0800 (PST) Received: from sccimhc02.asp.att.net (sccimhc02.asp.att.net [63.240.76.164]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7BBB643D4C for ; Sun, 18 Jan 2004 05:45:10 -0800 (PST) (envelope-from david.fleck@mchsi.com) Received: from grond (12-216-14-105.client.mchsi.com[12.216.14.105]) by sccimhc02.asp.att.net (sccimhc02) with SMTP id <20040118134509im20067upde>; Sun, 18 Jan 2004 13:45:09 +0000 Date: Sun, 18 Jan 2004 07:45:09 -0600 (CST) From: David Fleck Sender: dcf@grond.sourballs.org To: Rob In-Reply-To: <007d01c3dd7d$d0917530$a4b826cb@goo> Message-ID: <20040118074234.J602@grond.sourballs.org> References: <20040118030911.GA18161@tao.thought.org> <20040117215110.R602@grond.sourballs.org> <007d01c3dd7d$d0917530$a4b826cb@goo> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: Gary Kline cc: David Fleck cc: FreeBSD Mailing List Subject: Re: stumped... . X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jan 2004 13:45:11 -0000 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