bug-gawk
[Top][All Lists]
Advanced

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

Re: [bug-gawk] Debugging Script


From: Holger Klene
Subject: Re: [bug-gawk] Debugging Script
Date: Sat, 13 Apr 2019 07:53:00 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1

Hello!

Am 08.04.19 um 21:11 schrieb address@hidden:
>>> My questions:
>>> a) I don't get where my error is? Why doesn't my "workaround" just work?
> 
> See above - gawk isn't getting a regular file that it can open
> and read.

So if a normal file is a glass of beer, you say these strange files
cannot be put on the table, you have to drink them in one go.

>>> b) Is there a bug tracker on this known limitation [1]? What's the plan?
>>> Somebody working on it? ETA?
> 
> There is no bug tracker. There currently is no plan. Noone is working on it
> at the moment. Thus there is no ETA.
> 
>>> How hard can it be to keep a few lines of
>>> script in memory?
> 
> Not terribly hard, but it's not as simple as you might think, since
> gawk allows multiple -e and -f options, as well as `-f -' to read source
> code from standard input.  Essentially, gawk would have to create a
> temporary file, dump all the combined original source code into it, feed
> that to the debugger, and remember to remove the temporary file upon exit.
> 
>> I'm not aware of any bug tracker. This sounds more like a feature request
>> to me...
> 
> It is indeed a feature request. Not an unreasonable one, but one that
> hasn't come up yet in the ~ 8 years since the debugger has been available.
> 
> Patches are welcome and will be reviewed.
> 
> HTH,
> 
> Arnold

Yes indeed, it is a feature request! The author of the document foresaw
it coming [1] ... and ever since whenever people stumbled over it, it
gives the impression: this is a known topic and you better not waste
anybody's time by asking a question from the FAQ again.

Meanwhile a kind soul taught me how easy it can be to write a temporary
file (I better not go into the details of what I tried to accomplish the
same):

> cat <<'TheEnd' >/tmp/$USER$$
>    .
>    . 20 lines of awk code, nicely indented
>    .
> TheEnd
> gawk -f /tmp/$USER$$
> rm /tmp/$USER$$

Maybe you could add something like this as a "known workaround" to the
known limitations [1]?

In the end I could solve my problem and with your explanations, I
somewhat understand it now.

Thanx
Holger

[1] https://www.gnu.org/software/gawk/manual/html_node/Limitations.html

-- 
|_|/ MfG
| |\ Holger Klene

PGP Key ID: 0x22FFE57E

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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