|
From: | Steve Amerige |
Subject: | Re: [Help-bash] Bash Trap: How to Get Line Number of a Subprocess with Non-Zero Status |
Date: | Mon, 2 Jan 2017 04:59:49 -0500 |
User-agent: | Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 |
It's the difference between a simple command, which has a line number, and a subshell command, which does not. The subshell command's line number is derived from the execution context, which is relative to the start of the function. The OP wants the subshell's line number to be absolute, like the simple command's, and not relative to the start of the function, as it is now.
[Prev in Thread] | Current Thread | [Next in Thread] |