only replaces empty fields.
We had a discussion in another thread about $3=="" that IMHO should be equal to 2.
But Solaris /usr/xpg4/bin/awk (since the patch for bugID 5074811) treats it like 1.
I am unable to use 1 with awk . Instead, I have to use nawk
I am on SunOS 5.10
I can use nawk , but just wondering why awk is not working with 1 on my machine
Hi Don, may be you didn't read MadeInGermany's reply carefully (or may be it was not well explained). I think he meant that $3=="" is equivalent to $3~/^$/ (the 2nd code fragment in his post).
They still ship this in SysV R4.0 style i.e. link awk with oawk:
ls -li /usr/bin/*awk
54765 -r-xr-xr-x 2 root bin 89108 Oct 1 2007 /usr/bin/awk
54744 -r-xr-xr-x 1 root bin 126944 Oct 1 2007 /usr/bin/nawk
54765 -r-xr-xr-x 2 root bin 89108 Oct 1 2007 /usr/bin/oawk