From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6542 invoked from network); 26 Oct 1999 07:39:31 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 26 Oct 1999 07:39:31 -0000 Received: (qmail 28786 invoked by alias); 26 Oct 1999 07:39:06 -0000 Mailing-List: contact zsh-users-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 2699 Received: (qmail 28777 invoked from network); 26 Oct 1999 07:39:03 -0000 Date: Tue, 26 Oct 1999 10:39:50 +0300 From: Mircea Damian To: Geoff Wing Cc: zsh-users@sunsite.auc.dk Subject: Re: Upper case Message-ID: <19991026103950.B19163@linux.kappa.ro> References: <19991025225443.A8843@linux.kappa.ro> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: ; from mason@primenet.com.au on Mon, Oct 25, 1999 at 09:50:15PM +0000 On Mon, Oct 25, 1999 at 09:50:15PM +0000, Geoff Wing wrote: > Mircea Damian 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@kappa.ro, dmircea@roedu.net WebPage: http://taz.mania.k.ro/~dmircea/