bash echo date timestamp code example
Example 1: get current timestamp shell
// If you want to get unix timestamp, then you need to use:
timestamp=$(date +%s)
Example 2: unix timestamp bash
date +%s
# Give the number of seconds since epoch
// If you want to get unix timestamp, then you need to use:
timestamp=$(date +%s)
date +%s
# Give the number of seconds since epoch