home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!munnari.oz.au!samsung!transfer!jjmhome!alden!alden.UUCP
- From: sgr@alden.UUCP (Stan Ryckman)
- Newsgroups: comp.unix.questions
- Subject: Re: Awk Variables
- Message-ID: <510@alden.UUCP>
- Date: 12 Aug 92 18:04:57 GMT
- References: <1992Aug7.150523.14912@unx.ucc.okstate.edu> <1992Aug10.003934.24269@jpradley.jpr.com>
- Sender: usenet@alden.UUCP
- Organization: Alden Electronics, Westboro, MA
- Lines: 32
-
- In article <1992Aug10.003934.24269@jpradley.jpr.com> jpr@jpradley.jpr.com (Jean-Pierre Radley) writes:
- [...stuff deleted...]
- >RTFM. It's in there.
- >
- >awk '
- >...awk stuff to be done...
- >' var1=value1 var2=value2 file[s]
- >
- >--
- >Jean-Pierre Radley Unix in NYC jpr@jpr.com jpradley!jpr CIS: 72160,1341
-
- Not necessarily! Old awk's don't take var1=value1 type arguments.
-
- *** BEGIN GRIPE ***
-
- BTW, when this "enhancement" was invented, why didn't the brilliant
- person make it backwards compatible? i.e.,
- awk -f awk_script a=2
- FORMERLY read input from file "a=2" (a legal filename, after all.)
- Newer awks don't; they read from standard input after setting variable
- a to value 2. It would have been so simple to require something like:
- awk -f awk_script -set a=2
- (substitute any previously-unused switch for "-set") if you
- wanted to set variable a to value 2, and then the behavior of both
- old and new awks for the first line above would have been the same.
-
- *** END OF GRIPE ***
-
- Stan.
- --
- This .signature has expired. Call 1-900-YOU-FOOL to find out why.
- Stan Ryckman sgr@alden.UUCP
-