From owner-freebsd-questions@FreeBSD.ORG Fri Jul 27 12:34:44 2012 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0F209106564A for ; Fri, 27 Jul 2012 12:34:44 +0000 (UTC) (envelope-from guru@unixarea.de) Received: from ms16-1.1blu.de (ms16-1.1blu.de [89.202.0.34]) by mx1.freebsd.org (Postfix) with ESMTP id BF22B8FC0C for ; Fri, 27 Jul 2012 12:34:43 +0000 (UTC) Received: from [82.113.121.242] (helo=tiny.Sisis.de) by ms16-1.1blu.de with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1SujkX-0007fg-8P for freebsd-questions@freebsd.org; Fri, 27 Jul 2012 14:34:34 +0200 Received: from tiny.Sisis.de (localhost [127.0.0.1]) by tiny.Sisis.de (8.14.5/8.14.3) with ESMTP id q6RCYVsh002117 for ; Fri, 27 Jul 2012 14:34:31 +0200 (CEST) (envelope-from guru@unixarea.de) Received: (from guru@localhost) by tiny.Sisis.de (8.14.5/8.14.3/Submit) id q6RCYUAp002116 for freebsd-questions@freebsd.org; Fri, 27 Jul 2012 14:34:30 +0200 (CEST) (envelope-from guru@unixarea.de) X-Authentication-Warning: tiny.Sisis.de: guru set sender to guru@unixarea.de using -f Date: Fri, 27 Jul 2012 14:34:30 +0200 From: Matthias Apitz To: freebsd-questions@freebsd.org Message-ID: <20120727123429.GA2094@tiny.Sisis.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Operating-System: FreeBSD 10.0-CURRENT r226986 (i386) User-Agent: Mutt/1.5.21 (2010-09-15) X-Con-Id: 51246 X-Con-U: 0-guru X-Originating-IP: 82.113.121.242 Subject: calculating difference of times X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Matthias Apitz List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Jul 2012 12:34:44 -0000 Hello, Do we have something (in the ports) to calculate easy the difference of two times given as hh:mm - hh:mm? Some hack in bc(1) or something like this? Well, I could translate the times into UNIX seconds of epoche, build the diff and reconvert, but something more easy (and not in Perl or C, just shell); thanks matthias -- Matthias Apitz e - w http://www.unixarea.de/ UNIX since V7 on PDP-11, UNIX on mainframe since ESER 1055 (IBM /370) UNIX on x86 since SVR4.2 UnixWare 2.1.2, FreeBSD since 2.2.5