If I type
rm main!(.tex|.pdf) into a bash terminal, it will delete all files that start with
main but do not end in
The following shell script, however, doesn't do what I expect it to when placed in a file and then run
#!/bin/bash rm main!(.tex|.pdf)
A syntax error is reported at the
( token. What gives? What's the canonical way of doing something like this as part of a bash script. Is there are more elegant way of doing this than bringin
find to bear against the problem?