Created
April 27, 2020 13:06
-
-
Save simbamangu/2badd9147297c98feb99e3227b5aacdc to your computer and use it in GitHub Desktop.
Rename a file with UUID and extension
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Rename a file with a UUID, preserve the extension. | |
# Usage: | |
# mvuuid.sh TEST.JPG | |
# Output example: | |
# 887D830A-AE74-4835-8990-760908125E0B.JPG | |
mv $FILE `uuidgen`."${FILE##*.}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment