LINUX – bash time diff script

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
date11=$(date +"%s")
# do stuff here that your timing
date22=$(date +"%s")
diff11=$(($date22-$date11))
echo "$(($diff11 / 60)) minutes and $(($diff11 % 60)) seconds elapsed."
date11=$(date +"%s") # do stuff here that your timing date22=$(date +"%s") diff11=$(($date22-$date11)) echo "$(($diff11 / 60)) minutes and $(($diff11 % 60)) seconds elapsed."
date11=$(date +"%s")
# do stuff here that your timing
date22=$(date +"%s")
diff11=$(($date22-$date11))
echo "$(($diff11 / 60)) minutes and $(($diff11 % 60)) seconds elapsed."

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *