|
From: | Ed Morton |
Subject: | Re: How to make "division by zero attempted" error message more informative? |
Date: | Thu, 3 Mar 2022 11:04:43 -0600 |
User-agent: | Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.6.1 |
Out of curiosity though - what would you like the error message to say? Ed. On 3/3/2022 6:46 AM, Peng Yu wrote:
I see something like this. But when this kind of command is called at multiple scripts. It is hard to tell where the error is from. $ awk -e '{ print 10/$1 }' <<< 0 awk: cmd. line:1: (FILENAME=- FNR=1) fatal: division by zero attempted Is there a way to customize the error message so that I can know where the error is coming from? Thanks.
[Prev in Thread] | Current Thread | [Next in Thread] |