Renaming Files on Hoary
Joel Goguen
jtgoguen at gmail.com
Wed Jun 15 01:21:25 UTC 2005
Try escaping the * so it gets passed to the script as the * character.
So instead of
[jgoguen@/home/jgoguen]$ rename *.JPG *.jpg
you would have
[jgoguen@/home/jgoguen]$ rename \*.JPG \*.jpg
Give that a try, see if it helps you.
On Tue, 2005-14-06 at 20:43 -0400, Stephen R Laniel wrote:
> On Wed, Jun 15, 2005 at 10:16:04AM +1000, Serg Belokamen wrote:
> > for i in *.JPG; do mv ${i} `basename '.JPG' "${i}.jpg"`;done
>
> Sure. But what I meant is, suppose you want to encode this
> in a script (say, 'myrename') that allows you to do things
> like
>
> rename *.JPG *.jpg
>
> I just don't see that being possible when the shell's doing
> the globbing.
>
--
Joel Goguen
ITS Student Consultant
Bachelor of Computer Science III
University of New Brunswick
More information about the ubuntu-users
mailing list