Answers for "bash check the time"

3

shell script current time

#!/bin/bash
now="$(date)"
printf "Current date and time %sn" "$now"
 
now="$(date +'%d/%m/%Y')"
printf "Current date in dd/mm/yyyy format %sn" "$now"
 
echo "Starting backup at $now, please wait..."
# command to backup scripts goes here
# ...
Posted by: Guest on August-18-2020

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language