HELP converting filenames!

David Goodenough dg at lakart.UUCP
Wed Oct 11 03:20:52 AEST 1989


>From article <2694 at taux01.UUCP>, by amos at taux01.UUCP (Amos Shapir):
> In article <9754 at cadnetix.COM> rusty at cadnetix.COM (Rusty Carruth) writes:
> |
> |First, go to the directory of interest and do 'ls -1 > doit'.
> |Chmod 777 doit. Now, go edit 'doit' (for all you emacs haters
> |out there, sorry but emacs seems to work better for what I'm about
> |to suggest than does vi) .....

long discourse on emacs use deleted

> What?  You have to do all that in emacs, and you still claim it's
> better than vi?  To save vi's lost honor, here's how it should be done:
> 
> :%s/.*/mv & \U&\e/
> 
> One line, no macros needed.

I'd agree with Amos, except why not do the following:

foreach i ( filelist )
mv $i `echo $i | tr a-z A-Z`
end

(or if you still live in the dark ages)

for i in filelist
do
mv $i `echo $i | tr a-z A-Z`
done
-- 
	dg at lakart.UUCP - David Goodenough		+---+
						IHS	| +-+-+
	....... !harvard!xait!lakart!dg			+-+-+ |
AKA:	dg%lakart.uucp at xait.xerox.com			  +---+



More information about the Comp.unix.wizards mailing list