Date: Fri, 26 Jan 2007 15:00:47 +0100 From: Matthias Apitz <m.apitz@oclcpica.org> To: Vittorio <vdemart1@tin.it> Cc: freebsd-questions@freebsd.org Subject: Re: Renaming files in one shot Message-ID: <20070126140047.GA7762@rebelion.Sisis.de> In-Reply-To: <1105e9eb49e.vdemart1@tin.it> References: <1105e9eb49e.vdemart1@tin.it>
next in thread | previous in thread | raw e-mail | index | archive | help
El día Friday, January 26, 2007 a las 02:36:03PM +0100, Vittorio escribió: > Under a directory I have many pdf files named according to M$ Windows > rules, that is: > > Marylin Monroe.pdf > James Stewart.pdf > Alice in > Wonderland.pdf > Ludwig Van Beethoven.pdf > ..... > ..... > > Now I'd like to > rename them ** IN ONE SHOT ** (some more steps would be acceptable > anyway!) deleting all the blanks, that is > > MarylinMonroe.pdf > JamesStewart.pdf > AliceinWonderland.pdf > LudwigVanBeethoven.pdf > ........ > ........ > > How can I do that? with something like: $ for i in *.pdf ; do mv "$i" `echo "$i" | sed 's/ //g'` ; done (make a backup before :-)) matthias -- Matthias Apitz Manager Technical Support - OCLC PICA GmbH Gruenwalder Weg 28g - 82041 Oberhaching - Germany t +49-89-61308 351 - f +49-89-61308 399 - m +49-170-4527211 e <m.apitz@oclcpica.org> - w http://www.oclcpica.org/ http://guru.UnixLand.de/ b http://gurucubano.blogspot.com/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070126140047.GA7762>