[undiluted.org's Blog] -> Bash Trick

Bash Trick posted by: nic on February 22nd, 2009 @ 14:22:59
Here's a simple quick/dirty way to change the extension of all the files in a directory.

for i in *.JPG; do a=`echo $i | sed s/JPG/jpg/g`; mv $i $a; done
tags: [ programming, bash ]
Show Comments (0)
comments
no comments found.

Comment: