[linux-elitists] Re: GNOME > you
Mon Jan 5 19:25:03 PST 2004
On Mon, Jan 05, 2004 at 06:21:29PM -0800, Karsten M. Self wrote:
> For bulk renames or operations, the trick of generating a command,
> _then_ executing it after double-checking that it does what's intended,
> is common. Rick Moen's publicized one such trick -- you generate code,
> then pipe it through 'bash' when it's well-formed.
I know this is a little OT, but I was delighted to discover "rename"
which comes packaged with perl (at least in Debian). E.g.:
rename -n 's/^(\d)(.*).ogg$/$2$1.ogg/' *.ogg
(switch around leading numbers and text in filenames for a batch of ogg
And if you want to see what it's going to do first, just add -n.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: Digital signature
Url : http://allium.zgp.org/pipermail/linux-elitists/attachments/20040105/a4f5b08f/attachment.pgp
More information about the linux-elitists