home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / unix / question / 10664 < prev    next >
Encoding:
Internet Message Format  |  1992-09-02  |  1.0 KB

  1. Path: sparky!uunet!haven.umd.edu!darwin.sura.net!sgiblab!svcs1!slix
  2. From: slix@svcs1.UUCP (Bill Miller)
  3. Newsgroups: comp.unix.questions
  4. Subject: need script to rename uppercase filenames
  5. Keywords: script,tar,msdos
  6. Message-ID: <699@svcs1.UUCP>
  7. Date: 2 Sep 92 22:26:57 GMT
  8. Organization: Silicon Valley Computer Society, Sunnyvale, CA
  9. Lines: 19
  10.  
  11. Hi, everyone.
  12.  
  13. I'm fairly new to unix, and I need a script or procedure to do the following:
  14.  
  15. I have some source code in DOS (many separate files) that I tarred under
  16. DOS and untarred under 386BSD.  The big problem is that all the files
  17. came through in UPPERCASE and I need a script to mv (rename) them all
  18. to lowercase quickly.
  19.  
  20. Since they're in DOS text format, I realize I also need to strip the 
  21. extra carriage returns on each line.  I've been successful in doing this
  22. with:
  23.  
  24.   cat (file) | tr -d '\015' > (newfile)
  25.  
  26. It would be nice to combine both of these so that I could rename the
  27. files to uppercase and strip the extra newlines all in one fell swoop
  28. instead of doing it one file at a time.
  29.  
  30.