!; is interpreted as an history expansion that can never match anything

2023-08-07 Thread Emanuele Torre
! followed by a ; or another terminator is interpreted as an history expansion with no pattern that can never match anything. $ !; echo hi bash: !: event not found $ !&& echo hi bash: !: event not found It should not be intepreted as a history expansion that cannot possibly match anythin

Re: BASH_SUBSHELL is not incrementing when part of a pipeline

2023-08-07 Thread Greg Wooledge
On Mon, Aug 07, 2023 at 01:56:21PM +, Kamil Cukrowski Priv wrote: > Hi, when BASH_SUBSHELL is part of a pipeline with just a simple command it > does not increment. Consider the following: > # docker run -ti --rm bash bash -c 'echo $BASHPID $BASH_SUBSHELL; echo | > echo $BASHPID $BASH_SUBSHELL'

BASH_SUBSHELL is not incrementing when part of a pipeline

2023-08-07 Thread Kamil Cukrowski Priv
Hi, when BASH_SUBSHELL is part of a pipeline with just a simple command it does not increment. Consider the following: # docker run -ti --rm bash bash -c 'echo $BASHPID $BASH_SUBSHELL; echo | echo $BASHPID $BASH_SUBSHELL' 1 0 8 0 Doing anything else, like `echo | { echo $BASH_SUBSHELL; }` or lik