[Techtalk] lower to upper case
mim at miriam-english.org
Tue Oct 9 22:58:43 UTC 2007
Thanks for the great ideas folks. I'm rapt!
> On 10/9/07, Miriam English <mim at miriam-english.org> wrote:
>> for file in *
>> mv $file `echo $file | tr '[a-z]' 'A-Z'`
>> Is there an even simpler way?
Wim De Smet wrote:
> I don't think it is simpler, but you could do the same thing with sed
> instead of tr. I think that would be : sed 's/.*/\U&/'
Ahhhh yes, I *thought* there must be some way to use that kind of magic.
Kathryn Hogg wrote:
> Not necessarily simpler but you should use tr '[:upper:]' '[:lower:]'
I'd wondered about that, but I'd got my syntax wrong. Thanks Kathryn.
Those kinds of character class operators make a lot of other things
possible too that are otherwise extremely difficult, like [:punct:] for
Marize Pommot-Maia wrote:
> How about just using 'rename'? As in:
> rename .JPG .jpg *.JPG
Gosh. I've never noticed rename before. Thanks Marize. I'll look into
Benjamin A'Lee wrote:
> Take a look at moreutils (http://kitenet.net/~joey/code/moreutils, or
> as a debian package). It includes a script 'vidir' which lets you edit a
> directory in your text editor, so you can do anything that you can do
This is great stuff. Thanks Ben. I've always loved the idea of trying to
see the things around us that are rendered invisible by us taking them
for granted. That is what this guy Joey appears to have done -- looked
for the empty areas that most of us never notice. How cool!
A life! Cool! Where can I download one of those from?
More information about the Techtalk