Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: capitalizing file names
- X-seq: zsh-users 11456
- From: Phil Pennock <zsh-workers+phil.pennock@xxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: capitalizing file names
- Date: Thu, 26 Apr 2007 00:16:10 -0700
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=first1; d=spodhuis.org; h=Received:Date:From:To:Subject:Message-ID:Mail-Followup-To:References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To; b=MLOt6zDpDB95PwK4T9ubawF07nu2i63UIP7MTXi0DisylrA6O1TbtYvuQRQRc/0MzAlEpcX22X8F0SqDyV8HZ0Z77ULlM0P6vna0lsqzXvpqkNTJtid0Qm3plXPMRw0Yw+tVzqx22P9O9E2RIallQYjL8m5nBdLgj89ilaAnSqQ=;
- In-reply-to: <31691177567034@xxxxxxxxxxxxxxxxxx>
- Mail-followup-to: zsh-users@xxxxxxxxxx
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <31691177567034@xxxxxxxxxxxxxxxxxx>
On 2007-04-26 at 09:57 +0400, Artur Penttinen wrote:
> > I need to rename a series of files on Mac OS X, to reflect case
>
> > difference. I have multi-word file names such as
>
> > alexy_070411_1971.dng
> autoload zmv
>
> zmv '(*).(*)' '${(C)1}.${2:u}'
Nope, on MacOS with its case-preserving-but-insensitive file-system that
yields:
% zmv '(*).(*)' '${(C)1}.${2:u}'
zmv: error(s) in substitution:
file exists: Alexy_070411_1971.DNG
(Probably the same file, owing to file system limitations.)
In the definition of zmv: [[ $f != $g && $f -ef $g ]]
$f is the original filename, $g is the generated filename and they're
the same file (-ef, equal file).
-Phil
Messages sorted by:
Reverse Date,
Date,
Thread,
Author