Last active
December 24, 2015 12:59
-
-
Save kellyp/6801238 to your computer and use it in GitHub Desktop.
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 | |
if [ $# -eq 0 ] | |
then | |
echo "Please supply the name of the gem to timestamp" | |
exit | |
fi | |
file=`ls -t $1-*.gem` | |
new_file="${file//gem/$(date +"%Y%m%d%H%M%S").gem}" | |
echo "Renaming $file to $new_file" | |
mv $file $new_file |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment