From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,61de5f805429bb0d X-Google-Attributes: gidfee84,public From: Henk vd Langenberg Subject: Re: Problems with nawk/gawk in new(?) Digital UNIX Date: 1996/12/03 Message-ID: <32A4123E.41C6@urc.tue.nl>#1/1 X-Deja-AN: 202075808 references: content-type: text/plain; charset=us-ascii organization: Eindhoven University of Technology mime-version: 1.0 newsgroups: comp.unix.osf.osf1 x-mailer: Mozilla 3.0 (X11; I; IRIX 5.3 IP19) Sean Lane wrote: > > Yesterday I received a new AlphaStation 500/333 running (I assume) the latest > Digital UNIX (uname -a output gives OSF1 node V4.0 464 alpha) and comes with > the Common Desktop Environment. > > Since installing this machine, I noticed that one of my cron jobs > failed last night (a nawk script). Further investigation revealed that > changing the field seperator to '=' (with {FS="="} ), does not work. It > ignores the new field seperator specification and just uses the default > tab and space seperators. > > e.g. > > echo "physical memory = 128.00 megabytes." | nawk '{FS="="} {print $2}' > It works fine if you say (which is in fact better): echo "physical memory = 128.00 megabytes." | nawk 'BEGIN{FS="="}{print $2}' Henk. -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= = Henk van de Langenberg, Eindhoven University of Technology = = CC 1.91, P.O. Box 513, 5600 MB Eindhoven, The Netherlands = = E-mail: rchenk@urc.tue.nl, TEL/FAX: +31 40 2474533/2434438 = =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= = Reporter (to Indira Gandhi): = = Mr Gandhi, what do you think of Western Civilization? = = Gandhi: I think it would be a good idea. = =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=