[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bug path
From: |
Neil R. Ormos |
Subject: |
Re: bug path |
Date: |
Fri, 6 Nov 2020 20:33:45 -0600 (CST) |
Roberto do Rego wrote:
> OS 5.8.16-2-MANJARO #1 SMP PREEMPT Mon Oct 19 11:33:03 UTC 2020 x86_64
> GNU/Linux
> VERSION GNU Awk 5.1.0, API: 3.0 (GNU MPFR 4.1.0, GNU MP 6.2.0)
> Version 5.1 has a simple flaw but it generates
> problems when executing scripts, basically the
> gawk interpreter does not recognize the current
> work directory. In other words, it is necessary
> to indicate the complete path of the script to
> run it correctly.
> Example:
> $pwd
> /home/user
> $ gawk -f script.awk
> Generates error:
> gawk: fatal: unable to open source file "script.awk" for reading: File or
> directory does not exist.
> Just enter the full path to avoid the problemand the script runs normally.
> Example:
> $ gawk -f /home/user/script.awk
> -hELLO WORLD!
> This flaw is also present in the Windows version, making it impossible to use
> the relative path etc.
>
> I hope I helped, thank you all and good luck!
Have you checked the value of the AWKPATH
environment variable? E.g. via
gawk 'BEGIN{print ENVIRON["AWKPATH"]}'
Does AWKPATH contain a null entry or "."? This
section of the manual might be of help:
<http://www.gnu.org/software/gawk/manual/html_node/AWKPATH-Variable.html>
and especially footnote 14.
- bug path, Roberto do Rego, 2020/11/06
- Re: bug path,
Neil R. Ormos <=