I have a file that does not have an extension and would like to add an extension to it programmatically. I know the file
command gives information about the extension of a file. How can I utilize this to add the extension to a file? The files I'm downloading can be assumed to be image files (png, jpg, etc.)
My desired outcome would be:
Input: filename
Output: filename.ext
All inside a bash script