home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!gatech!darwin.sura.net!jvnc.net!rutgers!sgigate!sgiblab!svcs1!slix
- From: slix@svcs1.UUCP (Bill Miller)
- Newsgroups: comp.unix.questions
- Subject: Re: need script to rename uppercase filenames
- Summary: Can't make the script work, using csh under 386bsd
- Message-ID: <702@svcs1.UUCP>
- Date: 4 Sep 92 22:02:14 GMT
- References: <699@svcs1.UUCP> <1992Sep3.083107.11920@athena.mit.edu>
- Organization: Silicon Valley Computer Society, Sunnyvale, CA
- Lines: 16
-
- In article <1992Sep3.083107.11920@athena.mit.edu>, benjy@athena.mit.edu (Benjamin B Thomas) writes:
- B
- > Try:
- >
- > #!/bin/csh
- > foreach i ($argv)
- > setenv file $i
- > cat $file | tr -d '\015' > `echo foo | nawk '{print tolower(ENVIRON["file"])}'`
- o> rm $file
- I tried that, but it doesn't work. It simply zero-lengths the first
- file it finds and then promptly goes to bed - in a loop and doesn't
- process further. Killing it locks up the system. I don't understand
- one or two things. i dont seem to have 'nawk', I guess I could try
- substituting 'awk'? Also, what is 'foo'? Does csh understand 'foo' to
- mean something special, or is it trying to echo a file called 'foo' which
- I don't have?
-