Closed asr closed 2 months ago
Hi @asr, I think you'd have to ask eg #bash IRC channel; it looks like a change in bash. I get slightly different behaviour when comparing bash 3.2 and 5.2 on mac (both produce exit code 2 for me):
$ /bin/bash --version
GNU bash, version 3.2.57(1)-release (arm64-apple-darwin23)
$ /opt/homebrew/bin/bash --version
GNU bash, version 5.2.21(1)-release (aarch64-apple-darwin23.0.0)
$ /bin/bash -c 'echo ('; echo $?
/bin/bash: -c: line 0: syntax error near unexpected token `newline'
/bin/bash: -c: line 0: `echo ('
2
$ /opt/homebrew/bin/bash -c 'echo ('; echo $?
/opt/homebrew/bin/bash: -c: line 1: syntax error near unexpected token `newline'
/opt/homebrew/bin/bash: -c: line 1: `echo ('
2
Thanks @simonmichael.
Using Ubuntu 22.04.4 LTS and GNU bash version 5.1.16 the following test works running
shelltest
with the option--shell=bash
:but using Ubuntu 20.04.6 LTS and GNU bash version 5.0.17 I need to replace
line 1
byline 0
and>=2
by>=1
:Any ideas why I'm getting different outputs? I'm using
shelltest 1.10
compiled with GHC 9.10.1.