title: How to convert timestamp to hour/minutes/seconds in shell script?
body: <p>I am calculating how much time my code is taking in shell script - </p>
  
  <pre><code>date1=$(date +"%s")
  
  # some code here
  
  date2=$(date +"%s")
  diff=$(($date2-$date1))
  echo "Time Taken - $(($diff / 60)) minutes and $(($diff % 60)) seconds elapsed."
  </code></pre>
  
  <p>Above script prints out time taken in minutes and seconds. How can I add it for hours as well?  Meaning it should print out <code>Time Taken - 0 hours 54 minutes 0 seconds</code> something like this.</p>