[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: rename command

From: Pádraig Brady
Subject: Re: rename command
Date: Tue, 28 Jun 2011 09:57:02 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/20100227 Thunderbird/3.0.3

On 28/06/11 08:21, Erik Auerswald wrote:
> Hi,
> On Mon, Jun 27, 2011 at 05:26:48PM +0100, Pádraig Brady wrote:
>> On 27/06/11 10:11, Sami Kerola wrote:
>>> I have been lately making some util-linux patches and while doing
>>> so I found rename command.
>>> [...]
>> I've never used rename actually, instead using find | sed | sh
>> in the rare times I've had to do something like this.
>> I find that easier and more general, for lower casing etc.
>> That is a process per file though.
> FWIW, I usually use the rename perl script as distributed by Debian with
> the perl package (because it is available, convenient and works well).

Good point.

# dpkg -S $(readlink -f $(which rename))
perl: /usr/bin/prename

That one supports -f for "force" too,
but -n means "test" rather than "noclobber".

Of course the replacement syntax is different
and is more like my find | sed | sh pattern above,
except it's not a process per file.
So I'd prefer this one TBH.

So portable scripts should use `prename` I guess
for the perl syntax, and `rename` for the util-linux one.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]