Skip to content

Instantly share code, notes, and snippets.

@Blaisorblade
Created March 26, 2015 10:38
Show Gist options
  • Save Blaisorblade/a6fe78b522e260fc1d83 to your computer and use it in GitHub Desktop.
Save Blaisorblade/a6fe78b522e260fc1d83 to your computer and use it in GitHub Desktop.
My script to generate timestamps
#!/bin/sh
[ "$1" = "-d" ] && date +"%Y-%m-%d" || date +"%Y-%m-%d-%H.%M"
@Blaisorblade
Copy link
Author

Common usage:

mv file.ext file-$(timestamp -d).ext

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment