The
gawk utility is not quite the same as Solaris'
oawk ("old" awk) or
nawk ("new" awk); you probably ought to be using
nawk on Solaris (because
/bin/awk is
owak -- try a long list to see if
/bin/awk is the same size as
/bin/owak or
/bin/nawk to be sure).
oawk is the default for compatibility with existing AWK programs in the system utilities.
The
man page for
nawk shows the syntax for
-F ERE, the input field separator, which is different than the
-F FS argument on
owak.
The differences between
gawk and
nawk can be subtle but they can also cause you headaches -- best to stick with
nawk syntax for both and try to avoid the "extensions" found in
gawk.
If you're interested, the source code for
nawk (along with a large number of standard System V utilities (the ones Solaris uses) are available at
http://heirloom.sourceforge.net,
nawk itself can be gotten from
http://heirloom.sourceforge.net/tools.html either as part of a set of utilities or by itself with CVS (instructions on the page). You can compile and install
nawk on your Linux system and you'll be able to write AWK programs that will port between Linux and Solaris.
Sorry if this is a bit beyond the scope of your question, but as time goes on you may find the above useful developing on both Linux and Solaris. Hope this helps some.