Creates a nice ISO-8601 timestamp for usage in filenames, this is a built in format in some implementations of date.
Put the script somewhere in you path, i.e. in $HOME/bin (only you) or /usr/local/bin (everyone)
sudo cp timestamp /usr/local/binAdd timestamp to a filename on a backup
cp file.ext /mnt/backup/file.$(timestamp).extCreate a note with the current timestamp
vi meeting-notes-$(timestamp).txtJust show the current timestamp
timestampSometimes you only want the day and not the full timestamp, for those cases I've
added the day option which can also be invoked with -d like below
$ timestamp day
2017-11-07
$ echo notes-$(timestamp -d).txt
notes-2017-11-07.txt