how to rename files using sed?
Hello!
First of all I'd like to mention that your forums are a pain in the ass to walk through using links. Sorry if being rude but I got to tell it... Lots of links... getting mad to just post this :/ .
Well, talking about my doubt.. I've a little problem with a bunch of files I need to rename. They come from my almost extinc windows partition, and their names have a lot of spaces (), //, a mix of capital letters and the like.
I know there are some fancy guis that can do this but I'd like to do it using commands. I've got some practice with sed but it only can rename the strings it gets from ls, for example (just replacing blank spaces with '.'):
ls -R | sed 's/ /./g'
would output (no capital letters touched yet):
001.Paris.Eiffel.Tower.jpg
So, how can I make mv or rename accept those formatted lines as an input? Is it possible to do it without an script?
Thanks in advance. Regards.
<edit>got to use firefox in the end to correct some typos</edit>
Last edited by seimour; 05-02-2007 at 01:15 AM.
|