Path: utzoo!mnetor!uunet!husc6!bbn!oberon!ll-xn!ames!amdahl!drivax!frotz From: frotz@drivax.UUCP (Frotz) Newsgroups: comp.binaries.ibm.pc Subject: Re: Fix filenames on Unix Message-ID: <3363@drivax.UUCP> Date: 26 Apr 88 20:11:38 GMT References: <180@tekbspa.UUCP> Reply-To: frotz@drivax.UUCP (Frotz) Followup-To: comp.binaries.ibm.pc.d Distribution: na Organization: Digital Research, Inc., Monterey, California Lines: 27 Keywords: csh lower arc filenames Summary: csh script #In article <180@tekbspa.UUCP> joe@tekbspa.UUCP (Joe Angelo) writes: # /bin/ls $* >/tmp/XX$$ # tr '[A-Z]' '[a-z]' < /tmp/XX$$ > /tmp/YY$$ # echo 'set -v' # paste /tmp/XX$$ /tmp/YY$$ | sed 's/^/mv /' # rm -f /tmp/XX$$ /tmp/YY$$ # For all you csh hacks: # # lower # # Lowercases all filenames that are uppercased. # set progname = `basename $0` foreach file ($*) set newname = `echo $file | tr A-Z a-z` if -f $newname then echo ${progname}: Will not overwrite ${newname}. else echo ${progname}: \[$file\]\ -\> \[$newname\] mv $file $newname endif end # Frotz