lib/scripts/showtime
author paulson
Wed, 02 Dec 1998 15:53:05 +0100
changeset 6006 d2e271b8d651
parent 4450 2c64ce912684
child 9789 7e5e6c47c0b5
permissions -rwxr-xr-x
new rule rev_bexI

#!/bin/bash
#
# $Id$
#
# showtime - print time.

TIME=$1

SECS=$[ $TIME % 60 ]
[ $SECS -lt 10 ] && SECS=0$SECS

MINUTES=$[ ($TIME / 60) % 60 ]
[ $MINUTES -lt 10 ] && MINUTES=0$MINUTES

HOURS=$[ $TIME / 3600 ]

echo "${HOURS}:${MINUTES}:${SECS}"