bug-gawk
[Top][All Lists]
Advanced

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

Re: [bug-gawk] mention how to specify file names containing = in the doc


From: Ed Morton
Subject: Re: [bug-gawk] mention how to specify file names containing = in the doc
Date: Sun, 11 Aug 2019 09:24:38 -0500
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0

Sounds good, thanks!

On 8/11/2019 7:03 AM, address@hidden wrote:
Hi Ed,

I guess you have to down grade the trick from "well documented" to
merely "well known". :-)  It's part of the grand Oral Tradition of Unix,
along with the similar trick of  using ./-x to cause a file that
starts with a minus sign to not be treated as an option.

I will go ahead and add a sentence or two at an appropriate spot in
the manual.

Thanks for the suggestion,

Arnold

Ed Morton <address@hidden> wrote:

Documentation enhancement request:

Someone recently asked me how to pass a file name containing an `=` sign
(e.g. a file named `count=1`) as the input file name argument to awk.
They had tried this which of course fails:

      awk 'script' count=1

and I glibly told them it was well documented that you should do it as:

      awk 'script' ./count=1

Then I tried to find the documentation to provide a reference for that
and I couldn't.

The gawk manual in
https://www.gnu.org/software/gawk/manual/gawk.html#Other-Arguments tells
us that `count=1` on it's own would be taken  as a variable assignment
and then
https://www.gnu.org/software/gawk/manual/gawk.html#Assignment-Options
confirms that fact but I couldn't find anywhere that tells us how to
solve the issue by just sticking `./` in front of the file name.

Maybe we could get that stated somewhere in the manual?

      Ed.




reply via email to

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