I want to use the tolower() function with SunOS
nawk, but all I get is
nawk: calling undefined function tolower
The SunOS
nawk is from a time before awk acquired the tolower() and toupper() functions. Either use one of the freely available awks, or or use /usr/xpg4/bin/awk (if you have it), or write your own function to do it using index, substr, and gsub.
An example of such a function is in O'Reilly's _Sed & Awk_.
Patrick TJ McPhee
writes:
> SunOS includes three versions of awk. /usr/bin/awk is the old > (pre-1989) version. /usr/bin/nawk is the new awk which appeared > in 1989, and /usr/xpg4/bin/awk is supposed to conform to the single > unix specification. No one knows why Sun continues to ship old awk.