2 ms·
Even funner quirk with stuff like that: $ bash -c 'shopt -s extglob; rm -- !(x)' bash: -c: line 1: syntax error near unexpected token `(' bash: -c:
by prussian 5y ago
Even funner quirk with stuff like that:
$ bash -c 'shopt -s extglob; rm -- !(x)'
bash: -c: line 1: syntax error near unexpected token `('
bash: -c: line 1: `shopt -s extglob; rm -- !(x)'
Because of the strangeness of the bash parser, the glob has to come on the preceding line:
$ bash -c $'shopt -s extglob\nrm -- !(x)'