From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,61de5f805429bb0d,start X-Google-Attributes: gidfee84,public From: salane@axnd03.cern.ch (Sean Lane) Subject: Problems with nawk/gawk in new(?) Digital UNIX Date: 1996/11/27 Message-ID: #1/1 X-Deja-AN: 201006478 sender: news@news.cern.ch (USENET News System) x-nntp-posting-host: axnd03.cern.ch organization: CERN European Laboratory for Particle Physics keywords: nawk,gawk reply-to: salane@axnd03.cern.ch (Sean Lane) newsgroups: comp.unix.osf.osf1 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}' will give the output :- memory instead of :- 128.00 megabytes. which is the expected output (and which is produced on earlier versions of Digital UNIX). This also fails if you use gawk instead of nawk. However, it works if you use awk! I know that in REAL UNIX nawk is supposed to replace awk (and in some cases it is linked so that they are one and the same), so why is it that Digital has two seperate programs still? I have worked around the problem by copying the older (working) versions of nawk and gawk to the new machine since we have many scripts running using nawk. Just thought someone might want to know. Sean A Lane. ___________CERN - European Laboratory for Particle Physics__________ ENT - NOMAD Experiment ____________________________________________________________________ Email : sean.lane@cern.ch Snail mail : CERN, Case Postale 6, CH-1211-Geneve,23, Switzerland, Phone : + (41 22) 767 8987 (x78987) ____________________________________________________________________