lib/scripts/showtime
author wenzelm
Mon, 18 Sep 2000 14:49:51 +0200
changeset 10017 e146bbfc38c1
parent 9789 7e5e6c47c0b5
child 10555 2323ec838401
permissions -rwxr-xr-x
include ANNOUNCE;

#!/bin/bash
#
# $Id$
# Author: Markus Wenzel, TU Muenchen
# License: GPL (GNU GENERAL PUBLIC LICENSE)
#
# 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}"