From owner-freebsd-questions@FreeBSD.ORG Thu Aug 14 09:46:10 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7A5A537B404 for ; Thu, 14 Aug 2003 09:46:10 -0700 (PDT) Received: from remt22.cluster1.charter.net (remt22.cluster1.charter.net [209.225.8.32]) by mx1.FreeBSD.org (Postfix) with ESMTP id AB0EA43FBD for ; Thu, 14 Aug 2003 09:46:09 -0700 (PDT) (envelope-from chowse@charter.net) Received: from [66.168.145.25] (HELO moe) by remt22.cluster1.charter.net (CommuniGate Pro SMTP 4.0.6) with ESMTP id 123416376 for freebsd-questions@freebsd.org; Thu, 14 Aug 2003 12:46:07 -0400 From: "Charles Howse" To: Date: Thu, 14 Aug 2003 11:45:56 -0500 Message-ID: <002301c36283$8a8a40a0$04fea8c0@moe> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.2616 In-Reply-To: <87d6f89oya.fsf@pooh.honeypot.net> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Importance: Normal Subject: RE: Using bc in bash script X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Aug 2003 16:46:10 -0000 > > 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. Geeeezz, why don't they include some *SIMPLE* examples in the man pages? Not everybody has a degree in Advanced Calculus and works as a C++ programmer. ;-)