The awk function split(s,a,sep) splits a string s into an awk array a using the delimiter sep.
set time = 12:34:56set hr = `echo $time | awk ‘{split($0,a,”:” ); print a[1]}’` # = 12set sec = `echo $time | awk ‘{split($0,a,”:” ); print a[3]}’` # = 56#