format date linux code example
Example 1: date format in linux shell script
date_now=$(date "+%F-%H-%M-%S")
Example 2: fomat date output
[me@macos ~]$ date '+%Y/%m/%d %H:%M:%S'
2020/05/09 13:20:2
[me@macos ~]$ date -j -v +3d -f "%b %d" "Feb 10"
Thu Feb 13 12:47:10 PST 2020
Example 3: bash date
date #displays date and time in terminal