bash get seconds since epoch code example
Example 1: unix get epoch in miliseconds shell
date +"%T.%6N" # returns the current time with nanoseconds rounded to the first 6 digits, which is microseconds
# In general, every field of the `date` command's format can be given an optional field width..
Example 2: unix timestamp bash
date +%s
# Give the number of seconds since epoch