HELP converting filenames!

Amos Shapir amos at taux01.UUCP
Sat Oct 7 23:35:50 AEST 1989


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) and make a macro (sorry folks, this
|trick will pretty much require emacs) which adds a space or two
|to the end of the current line and then copies that line to its
|end (making a line like 'file' end up as 'file  file  ' - If
|you have a problem with the trailing space, make the macro
|a bit different), and then changes the added information to
|all lower case, then goes to the next line.  Now, execute 
|that macro 200 times.  Now go back and add the 'mv' command to
|the front of each line (another macro).

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.
-- 
	Amos Shapir		amos at taux01.nsc.com or amos at nsc.nsc.com
National Semiconductor (Israel) P.O.B. 3007, Herzlia 46104, Israel
Tel. +972 52 522261  TWX: 33691, fax: +972-52-558322
34 48 E / 32 10 N			(My other cpu is a NS32532)



More information about the Comp.unix.wizards mailing list