I have a folder on my desktop named Models. In the folder, there are named folders with jpeg files without the .jpg extensions. The jpeg file names are random hashes. I would like to use a bash script to batch rename these jpeg files to their directory names with increments and append the .jpg extension on each file.
It's basically something like
Alice/ a5ccB2ff3e ee420bc4a 2acee54dc ... Alex/ de33fa24c0 d1eaa48e0a ...
And I want to to be like
Alice/ Alice001.jpg Alice002.jpg Alice003.jpg ... Alex/ Alex001.jpg Alex002.jpg ...