home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Source Code 1992 March
/
Source_Code_CD-ROM_Walnut_Creek_March_1992.iso
/
usenet
/
altsrcs
/
2
/
2251
< prev
next >
Wrap
Internet Message Format
|
1990-12-28
|
1KB
From: pinard@IRO.UMontreal.CA (Francois Pinard)
Newsgroups: alt.sources
Subject: Re: Neat utility to convert uppercase filenames
Message-ID: <PINARD.90Dec10184326@kovic.IRO.UMontreal.CA>
Date: 10 Dec 90 23:43:26 GMT
In article <76@gdx.UUCP> jay@gdx.UUCP (Jay A. Snyder) writes:
Did you ever do mget from simtel20 or ymodem batch downloads from
an MSDOS BBS, and get a lot of uppercase files in your directory?
Well this is a utility that will take all specified files and
convert them to lower case.
I use this:
#!/bin/sh
# Convert upper case in file names to lower case.
# Copyright (C) 1990 Free Software Foundation, Inc.
# Francois Pinard <pinard@iro.umontreal.ca>, October 1990.
echo $* \
| tr " " "\012" \
| gawk '{ if ($1 != tolower($1)) { print "mv", $1, tolower($1) } }' \
| sh
I'm sure there is a one-liner in Perl to do the same :-).
--
Franc,ois Pinard ``Vivement GNU!'' pinard@iro.umontreal.ca
(514) 588-4656 cp 886 L'Epiphanie (Qc) J0K 1J0 ...!uunet!iros1!pinard