Skip to content

Instantly share code, notes, and snippets.

@ksaver
Created May 15, 2019 03:26
Show Gist options
  • Save ksaver/a39a8c02ecc37b6490b4b5298d6d6e53 to your computer and use it in GitHub Desktop.
Save ksaver/a39a8c02ecc37b6490b4b5298d6d6e53 to your computer and use it in GitHub Desktop.
A simple timestamp function, to use in scripts
#!/bin/bash
#
# timestamp.sh
# a simple timestamp function, to use in scripts
function timestamp(){
date +"%Y-%m-%d %H:%M:%S"
}
timestamp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment