3 ms·
BUGS The -F option is not necessary given the command line variable assignment feature; it remains only for backwards compatibility. EXAMPLES Print and sort th
by 3xblah 7y ago
BUGS
The -F option is not necessary given the command line variable assignment feature; it remains only for backwards compatibility.
EXAMPLES
Print and sort the login names of all users:
BEGIN { FS = ":" }
{ print $1 | "sort" }
The above is from the GAWK manpage. FWIW, the first example under EXAMPLES uses FS not -F.
There is nothing wrong with using FS instead of -F.
- Annatar 7y agoGAWK is not a real AWK!!! When will you people learn that GNU is not UNIX®️? FS is not used on the command line and doing so is asking for trouble. FS is a built-in variable and as such is treated specially.