title: grep a time hh:mm:ss
body: <p>i need to split a given date format (hh:mm:ss) like: 10:30:50
  in varibles like: hour=10; minute=30 and seconds=50 whit grep in a bash script.</p>
  
  <p>I get the time un a variable, for example: time="10:30:50"
  And I only get the seconds with the follow expression:</p>
  
  <blockquote>
    <p>seconds=<code>echo $time | grep -oE "[^:]+$"</code></p>
  </blockquote>
  
  <p>Any help to get the minutes and hours?</p>