<p dir="ltr">Wow! Shopt has enough options to make it stand next to emacs.</p>
<p dir="ltr">I don't understand why the default is essentially case insensitive when everything else in bash is case sensitive. It looks like the LANG makes it work that way but that makes no sense either to me. A != a in standard US English. </p>
<p dir="ltr">More of the secret mysteries of Unix philosophy I've never wrapped my head around.</p>
<div class="gmail_quote">On Aug 26, 2015 12:16 PM, "Scott Plante" <<a href="mailto:splante@insightsys.com">splante@insightsys.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
I didn't know the globasciiranges option.<br>
<br>
Another solution is the LC_COLLATE variable:<br>
<br>
splante:/tmp/x/> ls<br>
a.pdf A.pdf b.pdf B.pdf<br>
splante:/tmp/x/> ls [A-Z].pdf<br>
A.pdf b.pdf B.pdf<br>
splante:/tmp/x/> LC_COLLATE=C<br>
splante:/tmp/x/> ls [A-Z].pdf<br>
A.pdf B.pdf<br>
splante:/tmp/x/> LC_COLLATE=en_US<br>
splante:/tmp/x/> ls [A-Z].pdf<br>
A.pdf b.pdf B.pdf<br>
<br>
This is probably a better solution:<br>
<br>
splante:/tmp/x/> ls [[:upper:]].pdf<br>
A.pdf B.pdf<br>
<br>
<br>
Scott<br>
<br>
<br>
----- Original Message -----<br>
<br>
From: "Alex Carver" <<a href="mailto:agcarver%2Bale@acarver.net">agcarver+ale@acarver.net</a>><br>
To: <a href="mailto:ale@ale.org">ale@ale.org</a><br>
Sent: Wednesday, August 26, 2015 11:34:02 AM<br>
Subject: Re: [ale] BASHing my head<br>
<br>
You need to set the shopt globasciiranges otherwise it uses the values<br>
as lexical rather than pure ASCII values.<br>
<br>
<br>
On 2015-08-26 08:22, Scott M. Jones wrote:<br>
> For some reason my wildcard search in bash starting with uppercase<br>
> letters is finding files starting with lower case. I checked my 'shopt'<br>
> options and they should be correct, but changing them doesn't change the<br>
> results. In this case I DO want a case sensitive search but I'm not<br>
> getting that. What am I doing wrong? (Fedora 21 bash BTW.)<br>
><br>
> [scott@vbox21 tentcards]$ echo $SHELL<br>
> /bin/bash<br>
> [scott@vbox21 tentcards]$ ls [A-Z]*.pdf<br>
> no_materials.pdf tentcard.pdf tentcard_short.pdf tents.pdf<br>
> tents_short.pdf<br>
> [scott@vbox21 tentcards]$ shopt | grep -i case<br>
> nocaseglob off<br>
> nocasematch off<br>
> [scott@vbox21 tentcards]$ shopt -s nocaseglob<br>
> [scott@vbox21 tentcards]$ shopt -s nocasematch<br>
> [scott@vbox21 tentcards]$ ls [A-Z]*.pdf<br>
> no_materials.pdf tentcard.pdf tentcard_short.pdf tents.pdf<br>
> tents_short.pdf<br>
> [scott@vbox21 tentcards]$ shopt | grep -i case<br>
> nocaseglob on<br>
> nocasematch on<br>
> [scott@vbox21 tentcards]$<br>
> _______________________________________________<br>
> Ale mailing list<br>
> <a href="mailto:Ale@ale.org">Ale@ale.org</a><br>
> <a href="http://mail.ale.org/mailman/listinfo/ale" rel="noreferrer" target="_blank">http://mail.ale.org/mailman/listinfo/ale</a><br>
> See JOBS, ANNOUNCE and SCHOOLS lists at<br>
> <a href="http://mail.ale.org/mailman/listinfo" rel="noreferrer" target="_blank">http://mail.ale.org/mailman/listinfo</a><br>
><br>
<br>
_______________________________________________<br>
Ale mailing list<br>
<a href="mailto:Ale@ale.org">Ale@ale.org</a><br>
<a href="http://mail.ale.org/mailman/listinfo/ale" rel="noreferrer" target="_blank">http://mail.ale.org/mailman/listinfo/ale</a><br>
See JOBS, ANNOUNCE and SCHOOLS lists at<br>
<a href="http://mail.ale.org/mailman/listinfo" rel="noreferrer" target="_blank">http://mail.ale.org/mailman/listinfo</a><br>
_______________________________________________<br>
Ale mailing list<br>
<a href="mailto:Ale@ale.org">Ale@ale.org</a><br>
<a href="http://mail.ale.org/mailman/listinfo/ale" rel="noreferrer" target="_blank">http://mail.ale.org/mailman/listinfo/ale</a><br>
See JOBS, ANNOUNCE and SCHOOLS lists at<br>
<a href="http://mail.ale.org/mailman/listinfo" rel="noreferrer" target="_blank">http://mail.ale.org/mailman/listinfo</a><br>
</blockquote></div>