Batch rename

Jim Farrow jimf at graybox.co.uk
Fri Aug 21 07:47:57 UTC 2009


On Thu, 2009-08-20 at 19:08 -0400, Keith Clark wrote:
> I need a command to rename quite a few files (25) from a .jpeg extension
> to a .jpg extension.
> 
> Keith
> 
> 
> 

I'm not an expert but this works for me.

for i in *.jpeg; do mv $i `echo $i|sed 's/jpeg/jpg/'`; done

http://tldp.org/HOWTO/Bash-Prog-Intro-HOWTO.html#toc2



-- 
be happy and well,

Jimmy


ICQ: 20216303
M:   07594352913
E:   jimf at graybox.co.uk
U:   http://www.graybox.co.uk

**************************************************************
Any warranty and liability expired as you read this message...
Registered Linux user number 402687

'Whoso, as a rolling chariot, checks his uprisen anger,
him I call a charioteer; other folk merely hold the reins.'
**************************************************************
metta. 





More information about the ubuntu-users mailing list