<html><head></head><body><div><div>Yeah. What he said.</div><div><br></div><div>From my F22 bash-land (4.3.39):</div><div><br></div><div>touch a.pdf A.pdf b.pdf B.pdf c.pdf C.pdf z.pdf Z.pdf</div><div>[<a href="mailto:jkinney@dhcp061167">jkinney@dhcp061167</a>&nbsp;tmp]$ ls</div><div>a.pdf&nbsp;&nbsp;A.pdf&nbsp;&nbsp;b.pdf&nbsp;&nbsp;B.pdf&nbsp;&nbsp;c.pdf&nbsp;&nbsp;C.pdf&nbsp;&nbsp;z.pdf&nbsp;&nbsp;Z.pdf</div><div>[<a href="mailto:jkinney@dhcp061167">jkinney@dhcp061167</a>&nbsp;tmp]$ ls | grep "[A-Z].pdf"</div><div>A.pdf</div><div>B.pdf</div><div>C.pdf</div><div>Z.pdf</div><div>[<a href="mailto:jkinney@dhcp061167">jkinney@dhcp061167</a>&nbsp;tmp]$ ls | grep "[a-z].pdf"</div><div>a.pdf</div><div>b.pdf</div><div>c.pdf</div><div>z.pdf</div></div><div><br></div><div>On Wed, 2015-08-26 at 15:41 -0400, Ed Cashin wrote:</div><blockquote type="cite"><div dir="ltr">I've been biting my tongue here.&nbsp; I don't think these characteristics of bash are congruent with UNIX philosophy.&nbsp; The people who made UNIX complain about bash being bloated.&nbsp; These characteristics of bash are congruent with POSIX philosophy.<div><br></div><div>A UNIX-ish way of doing this would be ...</div><div><br></div><div>&nbsp; ls | grep '^[A-Z].*\.pdf'</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Aug 26, 2015 at 1:41 PM, Jim Kinney <span dir="ltr">&lt;<a href="mailto:jim.kinney@gmail.com" target="_blank">jim.kinney@gmail.com</a>&gt;</span> wrote:<br><blockquote type="cite"><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="HOEnZb"><div class="h5">
<div class="gmail_quote">On Aug 26, 2015 12:16 PM, "Scott Plante" &lt;<a href="mailto:splante@insightsys.com" target="_blank">splante@insightsys.com</a>&gt; wrote:<br type="attribution"><blockquote type="cite"><br>
I didn'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: "Alex Carver" &lt;<a href="mailto:agcarver%2Bale@acarver.net" target="_blank">agcarver+ale@acarver.net</a>&gt;<br>
To: <a href="mailto:ale@ale.org" target="_blank">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 'shopt'<br>
&gt; options and they should be correct, but changing them doesn't change the<br>
&gt; results. In this case I DO want a case sensitive search but I'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" target="_blank">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" target="_blank">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" target="_blank">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></blockquote></div>
</div></div><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></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">&nbsp; Ed Cashin &lt;<a href="mailto:ecashin@noserose.net" target="_blank">ecashin@noserose.net</a>&gt;</div></div>
</div>
</blockquote><div class="-x-evo-signature-wrapper"><span><pre>-- 
James P. Kinney III

Every time you stop a school, you will have to build a jail. What you
gain at one end you lose at the other. It's like feeding a dog on his
own tail. It won't fatten the dog.
- Speech 11/23/1900 Mark Twain

http://heretothereideas.blogspot.com/
</pre></span></div></body></html>