Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 8 Jan 2003 10:46:18 -0800
From:      Chris Doherty <chris-freebsd@randomcamel.net>
To:        "BigBrother (BigB3)" <bigbrother@bonbon.net>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Renaming files with spaces in the name to files without spaces..
Message-ID:  <20030108184617.GE1579@zot.electricrain.com>
In-Reply-To: <20030108175539.W65616@bigb3server.bbcluster.gr>
References:  <20030108175539.W65616@bigb3server.bbcluster.gr>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Jan 08, 2003 at 06:01:50PM +0200, BigBrother (BigB3) said: 
> -----BEGIN PGP SIGNED MESSAGE-----
> Sorry for this OT but I am trying for some hours to achieve a massive
> rename of files using a simple script and I have not success yet. I want
> to rename files like

there is already a general utility for this:
/usr/src/contrib/perl5/eg/rename .

leviathan:/home/chris:1168> /usr/src/contrib/perl5/eg/rename
Usage: rename perlexpr [filenames]

not only already written and tested, but you get to use perl regexen. :-)

HTH,
Chris

-------------------------------
Chris Doherty
chris [at] randomcamel.net

"I think," said Christopher Robin, "that we ought to eat
all our provisions now, so we won't have so much to carry."
               -- A. A. Milne
-------------------------------

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030108184617.GE1579>