Skip to content

Instantly share code, notes, and snippets.

@kellyp kellyp/timestamp.sh
Last active Dec 24, 2015

Embed
What would you like to do?
#!/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
You can’t perform that action at this time.