Consider the following commands:
bash -c 'trap "echo WORKS" EXIT; touch x'
(trap "echo WORKS" EXIT; touch x)
(trap "echo WORKS" EXIT && touch x)
bash -c 'trap "echo WORKS" EXIT; true'
bash -c 'trap "echo WORKS" EXIT; false'
bash -c 'trap "echo WORKS" EXIT; touch x && a'
bash -c 'trap "echo WORKS"
On Fri, Jan 25, 2019 at 11:22:07AM -0400, Brad Spencer wrote:
(...)
> Now consider this command:
>
> bash -c 'trap "echo WORKS" EXIT && touch x'
>
> On newer versions of bash, it produces no output. Substituting different
> commands in the trap or tracing it seems to indicate that the trap never
On 1/25/19 10:22 AM, Brad Spencer wrote:
> Consider the following commands:
>
> bash -c 'trap "echo WORKS" EXIT; touch x'
> (trap "echo WORKS" EXIT; touch x)
> (trap "echo WORKS" EXIT && touch x)
> bash -c 'trap "echo WORKS" EXIT; true'
> bash -c 'trap "echo WORKS" EXIT; false'
> bash -c 'trap "ec
>
> | the "answers" have mostly been about "how to do this".
>
> Yes, that would be the point, wouldn't it?
>
no. a discussion thread can have multiple points. one point that arose
was someone calling this technique (or python programmers, or both) crazy.
that's the one i'm talking about, as i'
On 1/22/19 10:23 PM, Chet Ramey wrote:
On 1/22/19 3:32 PM, Robert White wrote:
Howdy,
The following cannot work because, for some reason, the array subscript
parser insists on doing math on array indices even when the array is
associative instead of numeric
typeset -A UUID_TABLE
...
UUID_TABLE
On Fri, Jan 25, 2019, 9:51 PM Robert White On 1/22/19 10:23 PM, Chet Ramey wrote:
> > On 1/22/19 3:32 PM, Robert White wrote:
> >> Howdy,
> >>
> >> The following cannot work because, for some reason, the array subscript
> >> parser insists on doing math on array indices even when the array is
> >>
Configuration Information:
Machine: x86_64
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS: -g -O2 -Wno-parentheses -Wno-format-security
uname output: Linux hpxz 4.9.37 #1 SMP Sat Jul 15 08:39:05 CEST 2017 x86_64
GNU/Linux
Machine Type: x86_64-pc-linux-gnu
Bash Version: 5.0
Patch Level: 2
Release
On 1/26/19 4:37 AM, Dennis Williamson wrote:
On Fri, Jan 25, 2019, 9:51 PM Robert White
On 1/22/19 10:23 PM, Chet Ramey wrote:
On 1/22/19 3:32 PM, Robert White wrote:
Howdy,
The following cannot work because, for some reason, the array subscript
parser insists on doing math on array indices e