date-time-bash.sh
· 125 B · Bash
Raw
currentDate=$(date +"%m_%d_%Y")
currentTime=$(date +"%T")
echo "Hello! It is $currentTime on the $currentDate" >> my-log.log
1 | currentDate=$(date +"%m_%d_%Y") |
2 | currentTime=$(date +"%T") |
3 | |
4 | echo "Hello! It is $currentTime on the $currentDate" >> my-log.log |