Created
March 26, 2015 10:38
-
-
Save Blaisorblade/a6fe78b522e260fc1d83 to your computer and use it in GitHub Desktop.
My script to generate timestamps
This file contains hidden or 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/sh | |
[ "$1" = "-d" ] && date +"%Y-%m-%d" || date +"%Y-%m-%d-%H.%M" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Common usage:
mv file.ext file-$(timestamp -d).ext