I have a script case 11.2 in +([0-9])?(.+([0-9]))) echo aa;; *) echo bb;; esac
While using source test.sh it prints aa but while using bash test.sh it returns an error
test.sh: line 1: syntax error near unexpected token `('
test.sh: line 1: `case 11.2 in +([0-9])?(.+([0-9]))) echo aa;; *) echo bb;; esac'
An workaround is to use bash -i. But why they get different results in interactive and non-interactive mode?