Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Upper case



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