Shell script convert date to epoch or unix time.
date to epoch seconds can be achieved by using date command. Below is the script which asks user for an input and convert it to UNIX time format. #!/bin/bash read-p “Please enter a date in YYYY-MM-DD format: ” DATE1 echo “The UNIX time for $DATE1 is ...
code.linuxnix.com |