awk bug (or is it a feature)
P. D. Guthrie
pdg at ihdev.UUCP
Wed Apr 23 06:18:45 AEST 1986
In article <800 at brahma.cs.hw.AC.UK> pjbk at cs.hw.ac.uk (Peter King) writes:
>Our version of awk does not allow one to use a field specified
>by a numerical expression as the left hand side of an expression.
>
>The file below will pass the standard input through unmodified,
>although it is designed to replace the last field in each record
>with "LAST FIELD". Is this a bug or a feature?
> -----------------------
> { $NF = "LAST FIELD"
> print}
This works fine for me, so you must have a bug in your release.
--
Paul Guthrie `When the going gets weird,
ihnp4!ihdev!pdg The weird turn pro'
- H. Thompson
More information about the Net.bugs
mailing list