Path: utzoo!utgpu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!usc!apple!olivea!orc!inews!iwarp.intel.com!gargoyle!chinet!les From: les@chinet.chi.il.us (Leslie Mikesell) Newsgroups: alt.sources.wanted Subject: Re: lowercase routine. Message-ID: <1990Sep11.041500.15152@chinet.chi.il.us> Date: 11 Sep 90 04:15:00 GMT References: <745@babcock.cerc.wvu.wvnet.edu> <374@anacom1.UUCP> Organization: Chinet - Chicago Public Access UNIX Lines: 22 In article <374@anacom1.UUCP> jim@anacom1.UUCP (Jim Bacon, CPD Manager) writes: >>Michael> does anyone have a routine which can be compiled on UNIX that >>Michael> will read the current directory and convert all upcase names >>Michael> to lowercase? >>Michael> maybe some kind of script ??? >>A perl script perhaps? [ deleted...] >Here is a quick one in C. [deleted..] Did I miss the obvious shell solution or didn't anyone bother to post it? for i in *[A-Z]* do mv $i `echo $i|tr '[A-Z]' '[a-z]'` done There are some variations in the syntax for tr but I think that one should work everywhere. You might want to add a test for overwriting an existing destination file. Les Mikesell les@chinet.chi.il.us