From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-users@sunsite.dk
Subject: Re: capitalizing file names
Date: Sun, 29 Apr 2007 21:49:54 -0700 [thread overview]
Message-ID: <070429214954.ZM20239@torch.brasslantern.com> (raw)
In-Reply-To: <20070426071610.GA22513@redoubt.spodhuis.org>
On Apr 26, 12:16am, Phil Pennock wrote:
}
} > 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.)
Since you've already established that MacOS doesn't mishandle a "mv" where
the source and destination file names refer to the same file, it should
work just to do:
zmv -f '(*).(*)' '${(C)1}.${2:u}'
In general, though, I'd think this must be done in two steps. E.g.:
% zmv '(*).(*)' 'tmp_${(C)1}.${2:u}'
% zmv 'tmp_(*)' '$1'
next prev parent reply other threads:[~2007-04-30 4:50 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-26 5:57 Artur Penttinen
2007-04-26 7:16 ` Phil Pennock
2007-04-30 4:49 ` Bart Schaefer [this message]
2007-05-14 17:50 ` Peter Stephenson
2007-05-14 17:56 ` Peter Stephenson
-- strict thread matches above, loose matches on Subject: below --
2007-04-26 5:16 Alexy Khrabrov
2007-04-26 5:52 ` Phil Pennock
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=070429214954.ZM20239@torch.brasslantern.com \
--to=schaefer@brasslantern.com \
--cc=zsh-users@sunsite.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).