From owner-freebsd-questions Fri Jun 9 12: 8:26 2000 Delivered-To: freebsd-questions@freebsd.org Received: from mta03-svc.ntlworld.com (mta03-svc.ntlworld.com [62.253.162.43]) by hub.freebsd.org (Postfix) with ESMTP id 002EF37C430 for ; Fri, 9 Jun 2000 12:08:16 -0700 (PDT) (envelope-from mark@ukug.uk.freebsd.org) Received: from parish.my.domain ([62.253.86.207]) by mta03-svc.ntlworld.com (InterMail vM.4.01.02.27 201-229-119-110) with ESMTP id <20000609190812.HFSG290.mta03-svc.ntlworld.com@parish.my.domain>; Fri, 9 Jun 2000 20:08:12 +0100 Received: (from mark@localhost) by parish.my.domain (8.9.3/8.9.3) id UAA01600; Fri, 9 Jun 2000 20:08:11 +0100 (BST) (envelope-from mark) Date: Fri, 9 Jun 2000 20:08:10 +0100 From: Mark Ovens To: Aaron Jeremias Luz Cc: questions@freebsd.org Subject: Re: Is awk(1) broken? Message-ID: <20000609200810.F233@parish> References: <20000602005307.B535@parish> <20000606005300.A371@thud.rochester.rr.com> <20000608180806.A233@parish> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0.1i In-Reply-To: <20000608180806.A233@parish>; from mark@freebsd-uk.eu.org on Thu, Jun 08, 2000 at 06:08:06PM +0100 Organization: Total lack of Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Thu, Jun 08, 2000 at 06:08:06PM +0100, Mark Ovens wrote: > On Tue, Jun 06, 2000 at 12:53:00AM -0400, Aaron Jeremias Luz wrote: > > [snip] > > will actually interpret a filename that has an equal sign in as an > > assignment -- even if the file exists! > > > > I am not able to reproduce the error above, but I believe it > > must involve some problem with shell expansion. > > I tried replacing ``s=${cmd}'' with ``s=emacs'' but got the same > results. When I get time I will look at the source for awk because > it's behaviour is definitely different the manpage. > > Sorted it. The mistake I made was that without ``-v'' the ``s=${smd}'' must be *after* the awk program code: cat INDEX | awk 'BEGIN { FS = "|" } {if (index($1, s)...' s=${smd} This works fine. Thanks for the input. > > > > Hope this helps, > > Aaron > > > > Disclaimer: My system (a 486 running 3.1-RELEASE) is showing bit-rot, > > and it's time for me to go to bed. :-) > > -- > ...and on the eighth day God created UNIX > ________________________________________________________________ > FreeBSD - The Power To Serve http://www.freebsd.org > My Webpage http://ukug.uk.freebsd.org/~mark/ > mailto:mark@ukug.uk.freebsd.org http://www.radan.com > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message -- ...and on the eighth day God created UNIX ________________________________________________________________ FreeBSD - The Power To Serve http://www.freebsd.org My Webpage http://ukug.uk.freebsd.org/~mark/ mailto:mark@ukug.uk.freebsd.org http://www.radan.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message