lib/scripts/showtime
changeset 4450 2c64ce912684
parent 4436 a3a683a8bcc6
child 9789 7e5e6c47c0b5
equal deleted inserted replaced
4449:df30e75f670f 4450:2c64ce912684
     5 # showtime - print time.
     5 # showtime - print time.
     6 
     6 
     7 TIME=$1
     7 TIME=$1
     8 
     8 
     9 SECS=$[ $TIME % 60 ]
     9 SECS=$[ $TIME % 60 ]
       
    10 [ $SECS -lt 10 ] && SECS=0$SECS
       
    11 
    10 MINUTES=$[ ($TIME / 60) % 60 ]
    12 MINUTES=$[ ($TIME / 60) % 60 ]
       
    13 [ $MINUTES -lt 10 ] && MINUTES=0$MINUTES
       
    14 
    11 HOURS=$[ $TIME / 3600 ]
    15 HOURS=$[ $TIME / 3600 ]
    12 
    16 
    13 echo "${HOURS}:${MINUTES}:${SECS}"
    17 echo "${HOURS}:${MINUTES}:${SECS}"