[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: texindex awk syntax error
From: |
Bruno Haible |
Subject: |
Re: texindex awk syntax error |
Date: |
Sun, 23 Oct 2022 20:36:04 +0200 |
Gavin Smith wrote:
> It is not supposed to only run on GNU awk. In fact, it should prefer
> awk to gawk. I prefer not to run texindex with gawk because mawk is
> much faster.
OK.
> Do you have any idea why awk is saying there is a syntax error?
>
> awk: syntax error near line 1
> awk: bailing out near line 1
It boils down to this invocation:
$ awk -v Invocation_name=./texindex -f ../../texindex/texindex.awk -- -version
awk: syntax error near line 1
awk: bailing out near line 1
This awk does not support the '-v' option:
$ awk
awk: Usage: awk [-Fc] [-f source | 'cmds'] [files]
$ awk -f ../../texindex/texindex.awk -- -version
awk: syntax error near line 39
awk: bailing out near line 39
Apparently it does not understand the 'function' keyword.
nawk (= /usr/xpg4/bin/awk [2]) and gawk (preinstalled as /usr/bin/gawk [3])
are alternatives which work.
Therefore, on this platform, instead of picking the 'awk' that is found
in $PATH, it is a better strategy to look for 'nawk' or 'gawk' in $PATH.
Bruno
[1] https://docs.oracle.com/cd/E18752_01/html/816-5165/awk-1.html
[2] https://docs.oracle.com/cd/E88353_01/html/E37839/awk-1.html
[3] https://docs.oracle.com/cd/E88353_01/html/E37839/awk-1g.html
- macOS test failures - LC_ALL / LC_CTYPE / LC_MESSAGES, (continued)
- Re: texinfo-6.8.90 pretest on OpenSolaris, Bruno Haible, 2022/10/22
- Re: texinfo-6.8.90 pretest on Solaris 11.4, Bruno Haible, 2022/10/22
- Re: texinfo-6.8.90 pretest on Solaris 11.4, Bruno Haible, 2022/10/23
- Re: texinfo-6.8.90 pretest on Solaris 11.4, Bruno Haible, 2022/10/23
- texindex awk syntax error, Gavin Smith, 2022/10/23
- Re: texindex awk syntax error,
Bruno Haible <=
- Re: texindex awk syntax error, Gavin Smith, 2022/10/23
- Re: texindex awk syntax error, Eli Zaretskii, 2022/10/24
- Re: texindex awk syntax error, Gavin Smith, 2022/10/24
- Re: texindex awk syntax error, Eli Zaretskii, 2022/10/24
- Re: texindex awk syntax error, Gavin Smith, 2022/10/24
- Re: texindex awk syntax error, Eli Zaretskii, 2022/10/24
- Re: texindex awk syntax error, Bruno Haible, 2022/10/24
- Re: texindex awk syntax error, Gavin Smith, 2022/10/25
- Re: texindex awk syntax error, Bruno Haible, 2022/10/29
Re: texinfo-6.8.90 pretest on mingw, Bruno Haible, 2022/10/22