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

  1. Path: sparky!uunet!gatech!darwin.sura.net!jvnc.net!rutgers!sgigate!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. Summary: Can't make the script work, using csh under 386bsd
  6. Message-ID: <702@svcs1.UUCP>
  7. Date: 4 Sep 92 22:02:14 GMT
  8. References: <699@svcs1.UUCP> <1992Sep3.083107.11920@athena.mit.edu>
  9. Organization: Silicon Valley Computer Society, Sunnyvale, CA
  10. Lines: 16
  11.  
  12. In article <1992Sep3.083107.11920@athena.mit.edu>, benjy@athena.mit.edu (Benjamin B Thomas) writes:
  13. B
  14. > Try:
  15. > #!/bin/csh 
  16. > foreach i ($argv)
  17. > setenv file $i
  18. > cat $file | tr -d '\015' > `echo foo | nawk '{print tolower(ENVIRON["file"])}'`
  19. o> rm $file
  20. I tried that, but it doesn't work.  It simply zero-lengths the first
  21. file it finds and then promptly goes to bed - in a loop and doesn't
  22. process further.  Killing it locks up the system.  I don't understand
  23. one or two things.  i dont seem to have 'nawk', I guess I could try
  24. substituting 'awk'?  Also, what is 'foo'?  Does csh understand 'foo' to
  25. mean something special, or is it trying to echo a file called 'foo' which
  26. I don't have?
  27.