home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / unix / question / 10754 < prev    next >
Encoding:
Internet Message Format  |  1992-09-07  |  1.2 KB

  1. Path: sparky!uunet!pmafire!news.dell.com!swrinde!cs.utexas.edu!usc!wupost!darwin.sura.net!sgiblab!svcs1!slix
  2. From: slix@svcs1.UUCP (Bill Miller)
  3. Newsgroups: comp.unix.questions
  4. Subject: Re: need script to rename uppercase filenames
  5. Message-ID: <703@svcs1.UUCP>
  6. Date: 4 Sep 92 23:24:19 GMT
  7. References: <699@svcs1.UUCP> <1992Sep3.083107.11920@athena.mit.edu> <1992Sep3.120607.25089@umbc3.umbc.edu>
  8. Organization: Silicon Valley Computer Society, Sunnyvale, CA
  9. Lines: 20
  10.  
  11. In article <1992Sep3.120607.25089@umbc3.umbc.edu>, rouben@math13.math.umbc.edu (Rouben Rostamian) writes:
  12.  
  13. > I would suggest the quicker script:
  14. > #!/bin/sh
  15. > for file in *[A-Z]*
  16. > do
  17. > mv $file `echo $file | tr '[A-Z]' '[a-z]'`
  18. > done
  19. > This script changes all files names containing an uppercase letter 
  20. > in the current directory to lowercase.  I would not strip the \015s
  21. > so casually without knowing the contents of the files.
  22.  
  23. First of all, when I try that, it just stops, and starts echoing every
  24. thing I type  since I first run it to a 'typescript' file which eventually
  25. grows fairly large.  I can't kill the pid for the script - if I do that
  26. the system hangs.
  27.  
  28. FWIW I use 386BSD and csh, but nothing so far has worked as intended.
  29.