[illumos-Developer] awk, nawk, oawk, ...
Andrey N. Oktyabrski
ano at bestmx.ru
Tue Apr 5 10:25:23 PDT 2011
On 04/05/11 20:30, Garrett D'Amore wrote:
> Both xpg4/awk and nawk apparently have deficiencies, such that either
> one of them would require work to be able to replace the other.
For example:
$ printf "a\nb\n\n" \
| /usr/bin/nawk 'BEGIN{RS="\n\n"; ORS="=\n"} {print}'
a=
b=
=
$ printf "a\nb\n\n" \
| /usr/bin/awk 'BEGIN{RS="\n\n"; ORS="=\n"} {print}'
a=
b=
=
$ printf "a\nb\n\n" \
| /usr/xpg4/bin/awk 'BEGIN{RS="\n\n"; ORS="=\n"} {print}'
a=
b=
=
But the gawk is right here:
$ printf "a\nb\n\n" \
| /usr/bin/gawk 'BEGIN{RS="\n\n"; ORS="=\n"} {print}'
a
b=
More information about the Developer
mailing list