Adding extensions using shell script.
I have multiple jpeg image files that are named without the .jpg extension. They are images for a real estate listing database. Each file is named the listing number "." the photo number. Some listings have more than one photo.The files are created in a similar fashion to:
1234.1
1234.2
1234.3
1235.1
1235.2
1236.1
1236.2
1237.3
1238.4
I have been reading about mv and rename but am still confused as to how to correctly, and quickly, write the shell script to add a .jpg extension to all the photo files. So that an image would be renamed for example to 1234.1.jpg and 1234.2.jpg.
I think I need to have bash run in a loop but I'm stumped as how to correctly set that up.