[svlug] Caps on my Cisco Networking CD

Bevan Schroeder bevan at foo.net
Fri Nov 6 15:25:19 PST 1998


On Fri, 6 Nov 1998, Scott wrote:

> change this all to lowercase.  I know that there are some smart fellows
> out there that are just wizzes at perl or c.  If any of you could write
> me a short little app that would change these filenames to lowercase

C:
void main(void){ int c; while ((c=getchar()) != EOF) putchar (tolower (c)); }

perl: (I think)
perl -ne 'tr/A-Z/a-z/; print'

shell:
tr '[:upper:]' '[:lower:]'

A more interesting problem would be writing a driver that translates all
the names on the CD to lowercase transparently.  I can't quite do that in
my head. :)

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

All these are from memory, and may be incorrect.

-bevan


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



More information about the svlug mailing list