Date: Thu, 14 Aug 2003 18:49:20 +0200 From: Alexander Haderer <alexander.haderer@charite.de> To: "Charles Howse" <chowse@charter.net>, <freebsd-questions@freebsd.org> Subject: RE: Using bc in bash script Message-ID: <5.2.0.9.1.20030814184546.01a9b688@postamt1.charite.de> In-Reply-To: <002301c36283$8a8a40a0$04fea8c0@moe> References: <87d6f89oya.fsf@pooh.honeypot.net>
next in thread | previous in thread | raw e-mail | index | archive | help
At 11:45 14.08.2003 -0500, Charles Howse wrote: > > > Can I refine it to give me something like: .784 seconds? > > > > Use "bc -l" instead of bc. That should do it. > >No, that still gives 0 seconds. > >I think this whole thing is dependent on the fact that `date +%s` >reports integers. > >I'm still interested in something like .874 seconds, but for the time >being, I'll just use an if..then..else to say "less than 1 second" or >the actual number of seconds. > >I've looked at the time command suggested by Jez, haven't tried it yet. Note the trap: shell's builtin "time" command differs somewhat from installed "/usr/bin/time"! man time man builtin man <your_shell> Alexander
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5.2.0.9.1.20030814184546.01a9b688>