I had created some files like knob_A.png
and knob_a.png
and my teammate on Windows said this caused problems with her app. I decided to call it knob_W.png
instead of knob_a.png
. Then I did an rsync up to our shared server. In order to clean things up I then did
rm knob_[a-d]*.png
and it removed knob_A.png
too. This is wrong as a football bat.
Neither shopt -s nocaseglob
nor shopt -u nocaseglob
causes it to behave the way I want.
How do I tell bash to make its globs be case-sensitive like in the old days?
Best Answer
Bash is being case sensitive here. The problem is with the sorting order of the characters in the range. From the Bash manual (
info bash
):Try doing