Renaming multiple files with a shell script

Hey guys,

I'm really new to UNIX and shell scripting in general. For my internship I need to rename a bunch of files. Specifically, I need to change the first letter of each of the files to lowercase and I have to change the endings so they all basically look like "file_cone.jpg". I know I should use a for loop but other than that I'm pretty lost. Anything would help. Thanks

To save a lot of time.
What Shell are you running:

echo $SHELL

What Operating System are you running? Remember to blot anything confidential with X's.

uname -a

What do the existing filenames look like (please sample if the list is long).

ls -la

if you are using bash (4.0+)

# changing first character to lower
for file in * do  
     first=${i:0:1}
     mv "$file" "${first,}${file:1}"
done

Thanks, script runs fine, and I'm using bash btw.

---------- Post updated at 04:25 PM ---------- Previous update was at 04:20 PM ----------

Would you mind explaining exactly what the lines do?

you find what they mean in the bash reference