I have a directory and some of the files' extensions are in uppercase (.JPG) instead of lowercase.
I want to make sure every file has .jpg as its extension. How would I do this from a shell prompt?
feedback
|
This question came from our site for professional and enthusiast programmers.
|
Using Shell Parameter Expansion:
The | |||||||||||
feedback
|
|
If you can use external tools (not only bash), check
The | |||||
feedback
|
|
If you do have spaces in filenames:
| ||||
|
feedback
|
|
I would suggest to have a look at the
The man page is full of examples, so it takes no time to get used to it. On Debian systems it can be installed with:
| ||||
|
feedback
|
|
if you don't have spaces in the filenames:
| |||||||||||
feedback
|