Closed ArcEye closed 8 years ago
Hi @ArcEye. On my Debian Jessie awk links to gawk:
andy@thinkbabe:~$ which awk
/usr/bin/awk
andy@thinkbabe:~$ ls -la /usr/bin/awk
lrwxrwxrwx 1 root root 21 Nov 15 2014 /usr/bin/awk -> /etc/alternatives/awk
andy@thinkbabe:~$ ls -la /etc/alternatives/awk
lrwxrwxrwx 1 root root 13 Nov 17 2014 /etc/alternatives/awk -> /usr/bin/gawk
andy@thinkbabe:~$
So it looks like you've another awk installed than the default gawk. Thanks for the patch, I'll merge it.
Btw, just out of curiosity, can you tell me which awk doesn't have "--re-interval"? "awk --version" should tell
It is peculiar certainly. They should be exactly the same.
I don't have an /etc/alternatives entry for awk, just the binary, but the switch is supposed to exist.
which awk
/usr/bin/awk
awk --version
GNU Awk 4.1.1, API: 1.1 (GNU MPFR 3.1.2-p3, GNU MP 6.0.0)
Copyright (C) 1989, 1991-2014 Free Software Foundation.
awk --help
Usage: awk [POSIX or GNU style options] -f progfile [--] file ...
Usage: awk [POSIX or GNU style options] [--] 'program' file ...
POSIX options: GNU long options: (standard)
-f progfile --file=progfile
-F fs --field-separator=fs
-v var=val --assign=var=val
Short options: GNU long options: (extensions)
-b --characters-as-bytes
-c --traditional
-C --copyright
-d[file] --dump-variables[=file]
-D[file] --debug[=file]
-e 'program-text' --source='program-text'
-E file --exec=file
-g --gen-pot
-h --help
-i includefile --include=includefile
-l library --load=library
-L [fatal] --lint[=fatal]
-n --non-decimal-data
-M --bignum
-N --use-lc-numeric
-o[file] --pretty-print[=file]
-O --optimize
-p[file] --profile[=file]
-P --posix
-r --re-interval
-S --sandbox
-t --lint-old
-V --version
which gawk
/usr/bin/gawk
gawk --help
Usage: gawk [POSIX or GNU style options] -f progfile [--] file ...
Usage: gawk [POSIX or GNU style options] [--] 'program' file ...
POSIX options: GNU long options: (standard)
-f progfile --file=progfile
-F fs --field-separator=fs
-v var=val --assign=var=val
Short options: GNU long options: (extensions)
-b --characters-as-bytes
-c --traditional
-C --copyright
-d[file] --dump-variables[=file]
-D[file] --debug[=file]
-e 'program-text' --source='program-text'
-E file --exec=file
-g --gen-pot
-h --help
-i includefile --include=includefile
-l library --load=library
-L [fatal] --lint[=fatal]
-n --non-decimal-data
-M --bignum
-N --use-lc-numeric
-o[file] --pretty-print[=file]
-O --optimize
-p[file] --profile[=file]
-P --posix
-r --re-interval
-S --sandbox
-t --lint-old
-V --version
To report bugs, see node `Bugs' in `gawk.info', which is
section `Reporting Problems and Bugs' in the printed version.
gawk is a pattern scanning and processing language.
By default it reads standard input and writes standard output.
Examples:
gawk '{ sum += $1 }; END { print sum }' file
gawk -F: '{ print $1 }' /etc/passwd
gawk --version
GNU Awk 4.1.1, API: 1.1 (GNU MPFR 3.1.2-p3, GNU MP 6.0.0)
Copyright (C) 1989, 1991-2014 Free Software Foundation.
awk fails and throws error
awk: not an option: --re-interval
despite it appearing in the usage printSubstituting
gawk
works correctly.Signed-off-by: Mick arceye@mgware.co.uk