Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!uakari.primate.wisc.edu!ames!pacbell!att!chinet!les From: les@chinet.chi.il.us (Leslie Mikesell) Newsgroups: comp.unix.wizards Subject: Re: HELP converting filenames! Message-ID: <9766@chinet.chi.il.us> Date: 8 Oct 89 04:10:59 GMT References: <9234@pyr.gatech.EDU> <5003@omepd.UUCP> <9754@cadnetix.COM> <2694@taux01.UUCP> Reply-To: les@chinet.chi.il.us (Leslie Mikesell) Organization: Chinet - Public Access Unix Lines: 18 In article <2694@taux01.UUCP> amos@taux01.UUCP (Amos Shapir) writes: >|First, go to the directory of interest and do 'ls -1 > doit'. [...emacs conversion of "FILENAME" to "mv FILENAME filename"] >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. And, of course, you can read the original filenames in with: :r !ls and execute the commands in the edited buffer with: :w !sh No temporary files needed. Les Mikesell