home *** CD-ROM | disk | FTP | other *** search
- From: jrr@nsc.nsc.com (Jerry Roe)
- Newsgroups: alt.sources
- Subject: Re: Neat utility to convert uppercase filenames
- Message-ID: <1990Dec14.000613.7055@nsc.nsc.com>
- Date: 14 Dec 90 00:06:13 GMT
-
- In article <1990Dec11.150025.2119@mdivax1.uucp> mdivax1!bb29c!mitchell (Bill Mitchell) writes:
- >>
- >> (shell script deleted)
- >
- >Yours is similar to the one I was using, until I saw this one posted:
- >
- >for file in $*
- >do
- > mv -i $file `echo $file | tr A-Z a-z`
- >done
- >
- >The mv program typically refuses to overwrite an existing file and, having
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- >failed, leaves the original file in place with its original name.
-
-
- Uh, it's implicit in your script because of the "-i" option to mv, but some
- newer Unix users might miss that and instead focus on the "typically refuses
- to overwrite" part of your comment. mv, of course, typically *gladly* over-
- writes an existing file if used without the -i option.
-
- Yeah, I know - this is a source group, not discussion, so sorry for the
- non-source posting, but I thought some poor novice might benefit.
-
-
- Jerry Roe
- National Semiconductor
- Santa Clara, CA
-