help-gawk
[Top][All Lists]
Advanced

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

Re: How to make "division by zero attempted" error message more informat


From: Wolfgang Laun
Subject: Re: How to make "division by zero attempted" error message more informative?
Date: Thu, 3 Mar 2022 21:08:51 +0100

On Thu, 3 Mar 2022 at 19:17, Neil R. Ormos <ormos-gnulists17@ormos.org>
wrote:

>
> For each call to gawk in the multiple scripts, you could create a symlink
> to the gawk executable with a different distinguishing name, and then call
> gawk using that name.  Then, each error message will be prefaced by the
> distinguishing name.


You might do this on your very personal computer. But you might not care to
pull this through on a production system with any number of users and an IT
department that might have to say something in this matter.

I came across the problem of embedded anonymous awk (and other) scripts in
shell scripts a long time ago. I used two methods, depending on the quality
of the embedded script. First one is to store the script on a file, along
with the shell script. Second is to embed, but write it to a temporary file
(of course, adding the process number to the name in the global temporary
file space) before you call it; delete it after the call.

Wolfgang


reply via email to

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