[svlug] Caps on my Cisco Networking CD

Chris Waters xtifr at dsp.net
Fri Nov 6 23:07:14 PST 1998


Bevan Schroeder wrote:

> If you want to actually rename the files (won't work on a readonly
> CD...)

> > bash
> $ for f in *; do mv -v $f `echo $f | tr '[:upper:]' '[:lower:]'`; done

One minor stylistic quibble.  The backticks come from csh, and are hard
to spot, easy to confuse, and don't nest.  Every post-ksh bourne-like
shell (ksh, bash, zsh) supports the $() syntax which solves this
problem.  I don't think ksh even offers the backtick syntax, so $( is
more portable.

I know, it really doesn't matter in this case.  But backticks just
bother me.  They're ugly and crippled, just like csh/tcsh from which
they were spawned.  Just say no to csh/tcsh, *and* features derived from
them!  :-)

Oh, in case you're not sure:

for f in *; do mv -v $f $(echo $f | tr '[:upper:]' '[:lower:]'); done

Doesn't that look better?  :-)
-- 
Chris Waters   xtifr at dsp.net | I have a truly elegant proof of the
or   cwaters at systems.DHL.COM | above, but it is too long to fit into
http://www.dsp.net/xtifr     | this .signature file.

--
echo "unsubscribe svlug" | mail majordomo at svlug.org
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ to unsubscribe



More information about the svlug mailing list