home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / altsrcs / 2 / 2298 < prev    next >
Encoding:
Internet Message Format  |  1990-12-28  |  1.1 KB

  1. From: jrr@nsc.nsc.com (Jerry Roe)
  2. Newsgroups: alt.sources
  3. Subject: Re: Neat utility to convert uppercase filenames
  4. Message-ID: <1990Dec14.000613.7055@nsc.nsc.com>
  5. Date: 14 Dec 90 00:06:13 GMT
  6.  
  7. In article <1990Dec11.150025.2119@mdivax1.uucp> mdivax1!bb29c!mitchell (Bill Mitchell) writes:
  8. >>
  9. >> (shell script deleted)
  10. >
  11. >Yours is similar to the one I was using, until I saw this one posted:
  12. >
  13. >for file in $*
  14. >do
  15. >    mv -i $file `echo $file | tr A-Z a-z`
  16. >done
  17. >
  18. >The mv program typically refuses to overwrite an existing file and, having
  19.                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  20. >failed, leaves the original file in place with its original name.
  21.  
  22.  
  23. Uh, it's implicit in your script because of the "-i" option to mv, but some
  24. newer Unix users might miss that and instead focus on the "typically refuses
  25. to overwrite" part of your comment.  mv, of course, typically *gladly* over-
  26. writes an existing file if used without the -i option.
  27.  
  28. Yeah, I know - this is a source group, not discussion, so sorry for the
  29. non-source posting, but I thought some poor novice might benefit.
  30.  
  31.  
  32. Jerry Roe
  33. National Semiconductor
  34. Santa Clara, CA
  35.