Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!wuarchive!decwrl!nsc!taux01!amos From: amos@taux01.UUCP (Amos Shapir) Newsgroups: comp.unix.wizards Subject: Re: HELP converting filenames! Message-ID: <2694@taux01.UUCP> Date: 7 Oct 89 13:35:50 GMT References: <9234@pyr.gatech.EDU> <5003@omepd.UUCP> <9754@cadnetix.COM> Organization: National Semiconductor (IC) Ltd, Israel Home of the 32532 Lines: 26 Hdate: 8 Tishrey 5750 In article <9754@cadnetix.COM> rusty@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@taux01.nsc.com or amos@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)