bug-gawk
[Top][All Lists]
Advanced

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

Re: [bug-gawk] Can a GAWK script access its full path\name at "run-time?


From: Eli Zaretskii
Subject: Re: [bug-gawk] Can a GAWK script access its full path\name at "run-time?
Date: Fri, 15 May 2015 10:22:46 +0300

> Date: Thu, 14 May 2015 18:08:26 -0400
> From: "Andrew J. Schorr" <address@hidden>
> Cc: address@hidden, address@hidden, address@hidden
> 
> > I suppose you can add it to master, if you will also add a few paragraphs
> > in the "Undocumented" node in the manual (and only there).  I don't feel
> > like making it an official, supported feature.
> 
> How does the attached patch look?  It's hard to test whether the documentation
> is correct, since one does not see it in the formatted docs.

LGTM, with a couple of minor comments below.

> +The @code{PROCINFO["argv"]} array contains all of the command-line arguments
> +(after glob expansion and redirection processing on platforms where that must
> +be done manually by the program) with subscripts ranging from 0 through
> address@hidden  For example, @code{PROCINFO["argv"][0]} will contain the name
> +by which @command{gawk} was invoked.  Here is an example of how this feature
> +may be used:

I think you should use @samp here, not @code, so that there are quotes
around these expressions in the printed version.

> address@hidden
> +awk 'BEGIN @{ for (i = 0; i < length(PROCINFO["argv"]); i++) print i, 
> PROCINFO["argv"][i] @}'
> address@hidden example

This line is too long, and should be broken into two (with a comment
that it's a single long line).  Long lines in @example overflow the
page margins, because TeX won't refill them.

Thanks.



reply via email to

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