bug-gawk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Include directive bug fix


From: arnold
Subject: Re: Include directive bug fix
Date: Fri, 05 May 2023 00:28:31 -0600
User-agent: Heirloom mailx 12.5 7/5/10

Hello.

Thank you for taking the time to report an issue. In the future,
please use the `gawkbug' script for doing so.

In this case, gawk is behaving as designed and as documented
in the manual. In particular, see
https://www.gnu.org/software/gawk/manual/html_node/AWKPATH-Variable.html
In particular, this statement:

        But with gawk, if the file name supplied to the -f or -i
        options does not contain a directory separator ‘/’, then
        gawk searches a list of directories (called the search path)
        one by one, looking for a file with the specified name.

Arnold

ykulebiakin via "Bug reports only for gawk." <bug-gawk@gnu.org> wrote:

> Hello,
>
> I found an issue with the @include directive: it does not always search 
> directories mentioned in AWKPATH.
>
> For example, if we have the following directory structure:
>
> <root>
>
> main.awk
>
> @include "dir1/include.awk"
>
> include/
>
> dir1/
>
> include.awk
>
> then the following command will not work: AWKPATH=include gawk -f ./main.awk, 
> because AWKPATH is not used then we have a path (with the directory 
> separator) in the @include directive.
>
> I apply the patch to the io.c file which will solve the problem.
>
> Yours sincerely,
>
> Yehor



reply via email to

[Prev in Thread] Current Thread [Next in Thread]