The Emergent Properties of Meat
Blog
Software
Hardware
About me
Photography
 Logos
Bigger projects: emc2 & AXIS
Friends' pages:
Alex
Bill
Chris
Jon
Michael
Email me: jepler@unpy.net

« As seen in hell.... | Newest entries | Math is hard (even for google)! »

Turns out that when you don't LC_COLLATE=C; export LC_COLLATE, you'll eventually get bitten in the ass by the way character ranges in shell globs are treated:
$ (unset LC_COLLATE; bash)
$ touch A a B b Z z; echo [A-Z]; echo [a-z]
A b B z Z
a A b B z
In this case, my friend discovered the interesting behavior after executing 'rm [a-z]*', apparently hoping to keep files which started with uppercase letters. Whoops!



Powered by the Emergent Properties of Meat. Copyright © 2004-2007 Jeff Epler
[æ]