Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2
Hi,
can anyone explain why the following line prints 0 instead of 1?:
$ stat=0; false || echo hi && echo ho && stat=1 | tee /dev/null; echo $stat
hi
ho
0
It does what I'd expect when removing the pipe, so it's obviously caused
by some pipe magic going on ...:
$ stat=0; false || echo hi && echo ho && stat=1; echo $stat
hi
ho
1
Thanks,
Chris