bash - shell script: time difference -


This is my script that is the time difference between my date and time to make the operation more efficient Is there any other way?

  #! / Bin / bash mydate = 20141224 # yyyymmdd mytime = 00: 00: 00 #hh: mm: SS current = $ $ ((Diff / 86400)) = $ ((diff - (day * 86400)) diff = $ (( Left =) $ = ((diff / 3600) left = $ ((diff - (* 3600 hours)) diff = $ ((left)) min = $ ($ / diff / 60)) left = $ (( Diff - (min * 60) diff = $ (left)) sec = $ ((diff)) echo "d" $ hour per day "h" $ min "minimum" $ sec "seconds"  < / Pre> 


Comments

Popular posts from this blog

winforms - C# Form - Property Change -

java - Messages from .properties file do not display UTF-8 characters -

javascript - amcharts makechart not working -