Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Upper case
- X-seq: zsh-users 2699
- From: Mircea Damian <dmircea@xxxxxxxxxxxxxx>
- To: Geoff Wing <mason@xxxxxxxxxxxxxxx>
- Subject: Re: Upper case
- Date: Tue, 26 Oct 1999 10:39:50 +0300
- Cc: zsh-users@xxxxxxxxxxxxxx
- In-reply-to: <slrn819k4n.1bm.mason@xxxxxxxxxxxxxxxxxxxxx>; from mason@xxxxxxxxxxxxxxx on Mon, Oct 25, 1999 at 09:50:15PM +0000
- Mailing-list: contact zsh-users-help@xxxxxxxxxxxxxx; run by ezmlm
- References: <19991025225443.A8843@xxxxxxxxxxxxxx> <slrn819k4n.1bm.mason@xxxxxxxxxxxxxxxxxxxxx>
On Mon, Oct 25, 1999 at 09:50:15PM +0000, Geoff Wing wrote:
> Mircea Damian <dmircea@xxxxxxxxxxxxxx> typed:
> :I was wondering yesterday if there is a simple way to rename all my song
> :files(mp3) from
> :name with spaces.mp3 -> Name With Spaces.mp3
> :
> :with something like:
> :for i in *.mp3; do
> :mv -v $i (UNKNOWN_PART_TO_ME)
>
> One way:
> mv $i ${${(C)i}:s/Mp3/mp3/}
>
> :done
Thanks a lot! I've seen "C" in the manual but I thought it would capitalize
all letters. That was a wrong thought! Thanks again!
It is far better than the perl RE that I used:
s/(?:^|(?<=\s))(\w)(\w+)(?:$|(?=\.)|(?=\s))/uc($1).$2/ge
:-)
>
> Regards,
--
Mircea Damian
E-mails: dmircea@xxxxxxxx, dmircea@xxxxxxxxx
WebPage: http://taz.mania.k.ro/~dmircea/
Messages sorted by:
Reverse Date,
Date,
Thread,
Author