Re: bash scripting question
- From: Chris Jackson <c.jackson@xxxxxxxxxxxxxxx>
- Date: Fri, 19 Mar 2010 20:13:22 +0000
Paul E Condon wrote:
Try:
bgn=$(date +%s)
sleep 7
end=$(date +%s)
echo "elapsed seconds = " $(( end - bgn ))
You might also want to experiment with:
ps h -o etime $$
as long as you're happy with it only running under gnu. Prints the elapsed time for the shell.
--
Chris Jackson
Shadowcat Systems Ltd.
--
To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx with a subject of "unsubscribe". Trouble? Contact listmaster@xxxxxxxxxxxxxxxx
Archive: http://lists.debian.org/4BA3DAE2.7080208@xxxxxxxxxxxxxxx
- References:
- bash scripting question
- From: Mike McClain
- Re: bash scripting question
- From: Paul E Condon
- bash scripting question
- Prev by Date: Re: How to reduce a debian system to a base system
- Next by Date: Re: Tool that monitor time connection
- Previous by thread: Re: bash scripting question
- Next by thread: Re: bash scripting question
- Index(es):
Relevant Pages
|