On 04/04/2017 03:17 PM, Patrick Dupre wrote:
> I would imagine that you're using "#!/bin/sh" as
the first line in the
> script, and bash is working in POSIX mode. Try using "#!/bin/bash" as
> the first line in the script.
No, it does not help
Ah. You have to set the extglob option, as documented in the bash man page:
$ ./testbash
test.bib
$ cat testbash
#!/bin/bash
shopt -s extglob
ls -d !(*(a)(-e)).bib