Link to home
Start Free TrialLog in
Avatar of techass
techass

asked on

convert microseconds into hours munites and seconds using awk.

how can i convert a long int value(time in microseconds) into hours munites and seconds using awk.
Avatar of ozo
ozo
Flag of United States of America image

awk '{printf"%02d:%02d:%02d\n",$1/3600000000,$1/60000000%60,$1/1000000%60}'
Avatar of techass
techass

ASKER

yes but if also I could convert the time in mks into hh:mm:ss.ms (where ms is miliseconds ). Also I need to print other columns too. $2, $3.. so on.
ASKER CERTIFIED SOLUTION
Avatar of ozo
ozo
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial