Last active
May 11, 2020 18:10
-
-
Save simbamangu/d5550dc1b8be047355106fd3145d9e41 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 $1 `uuidgen`."${1##*.}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment