<p dir="ltr">Wow! Shopt has enough options to make it stand next to emacs.</p>
<p dir="ltr">I don&#39;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&#39;ve never wrapped my head around.</p>
<div class="gmail_quote">On Aug 26, 2015 12:16 PM, &quot;Scott Plante&quot; &lt;<a href="mailto:splante@insightsys.com">splante@insightsys.com</a>&gt; 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&#39;t know the globasciiranges option.<br>
<br>
Another solution is the LC_COLLATE variable:<br>
<br>
splante:/tmp/x/&gt; ls<br>
a.pdf A.pdf b.pdf B.pdf<br>
splante:/tmp/x/&gt; ls [A-Z].pdf<br>
A.pdf b.pdf B.pdf<br>
splante:/tmp/x/&gt; LC_COLLATE=C<br>
splante:/tmp/x/&gt; ls [A-Z].pdf<br>
A.pdf B.pdf<br>
splante:/tmp/x/&gt; LC_COLLATE=en_US<br>
splante:/tmp/x/&gt; ls [A-Z].pdf<br>
A.pdf b.pdf B.pdf<br>
<br>
This is probably a better solution:<br>
<br>
splante:/tmp/x/&gt; ls [[:upper:]].pdf<br>
A.pdf B.pdf<br>
<br>
<br>
Scott<br>
<br>
<br>
----- Original Message -----<br>
<br>
From: &quot;Alex Carver&quot; &lt;<a href="mailto:agcarver%2Bale@acarver.net">agcarver+ale@acarver.net</a>&gt;<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>
&gt; For some reason my wildcard search in bash starting with uppercase<br>
&gt; letters is finding files starting with lower case. I checked my &#39;shopt&#39;<br>
&gt; options and they should be correct, but changing them doesn&#39;t change the<br>
&gt; results. In this case I DO want a case sensitive search but I&#39;m not<br>
&gt; getting that. What am I doing wrong? (Fedora 21 bash BTW.)<br>
&gt;<br>
&gt; [scott@vbox21 tentcards]$ echo $SHELL<br>
&gt; /bin/bash<br>
&gt; [scott@vbox21 tentcards]$ ls [A-Z]*.pdf<br>
&gt; no_materials.pdf tentcard.pdf tentcard_short.pdf tents.pdf<br>
&gt; tents_short.pdf<br>
&gt; [scott@vbox21 tentcards]$ shopt | grep -i case<br>
&gt; nocaseglob off<br>
&gt; nocasematch off<br>
&gt; [scott@vbox21 tentcards]$ shopt -s nocaseglob<br>
&gt; [scott@vbox21 tentcards]$ shopt -s nocasematch<br>
&gt; [scott@vbox21 tentcards]$ ls [A-Z]*.pdf<br>
&gt; no_materials.pdf tentcard.pdf tentcard_short.pdf tents.pdf<br>
&gt; tents_short.pdf<br>
&gt; [scott@vbox21 tentcards]$ shopt | grep -i case<br>
&gt; nocaseglob on<br>
&gt; nocasematch on<br>
&gt; [scott@vbox21 tentcards]$<br>
&gt; _______________________________________________<br>
&gt; Ale mailing list<br>
&gt; <a href="mailto:Ale@ale.org">Ale@ale.org</a><br>
&gt; <a href="http://mail.ale.org/mailman/listinfo/ale" rel="noreferrer" target="_blank">http://mail.ale.org/mailman/listinfo/ale</a><br>
&gt; See JOBS, ANNOUNCE and SCHOOLS lists at<br>
&gt; <a href="http://mail.ale.org/mailman/listinfo" rel="noreferrer" target="_blank">http://mail.ale.org/mailman/listinfo</a><br>
&gt;<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>