Date: Fri, 9 Jun 2000 20:08:10 +0100 From: Mark Ovens <mark@ukug.uk.freebsd.org> To: Aaron Jeremias Luz <aaron@csh.rit.edu> Cc: questions@freebsd.org Subject: Re: Is awk(1) broken? Message-ID: <20000609200810.F233@parish> In-Reply-To: <20000608180806.A233@parish>; from mark@freebsd-uk.eu.org on Thu, Jun 08, 2000 at 06:08:06PM %2B0100 References: <20000602005307.B535@parish> <20000606005300.A371@thud.rochester.rr.com> <20000608180806.A233@parish>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000609200810.F233>