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?
|
|
Using Shell Parameter Expansion:
The |
|||||||||||
|
|
If you can use external tools (not only bash), check
The |
|||
|
If you do have spaces in filenames:
|
||||
|
|
|
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:
|
||||
|
|
|
if you don't have spaces in the filenames:
|
|||||||||||
|