Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

shell script current time

#!/bin/bash
now="$(date)"
printf "Current date and time %s
" "$now"
 
now="$(date +'%d/%m/%Y')"
printf "Current date in dd/mm/yyyy format %s
" "$now"
 
echo "Starting backup at $now, please wait..."
# command to backup scripts goes here
# ...
Source by www.cyberciti.biz #
 
PREVIOUS NEXT
Tagged: #shell #script #current #time
ADD COMMENT
Topic
Name
3+3 =