From owner-freebsd-questions Fri Jul 28 11:58:47 2000 Delivered-To: freebsd-questions@freebsd.org Received: from mail2.netcologne.de (mail2.netcologne.de [194.8.194.103]) by hub.freebsd.org (Postfix) with ESMTP id B0D9337BB83 for ; Fri, 28 Jul 2000 11:58:35 -0700 (PDT) (envelope-from pherman@frenchfries.net) Received: from bagabeedaboo.security.at12.de (dial-194-8-195-176.netcologne.de [194.8.195.176]) by mail2.netcologne.de (8.9.3/8.9.3) with ESMTP id UAA28068; Fri, 28 Jul 2000 20:58:32 +0200 (MET DST) Received: from localhost (localhost.security.at12.de [127.0.0.1]) by bagabeedaboo.security.at12.de (8.10.2/8.10.2) with ESMTP id e6SIwOh09819; Fri, 28 Jul 2000 20:58:24 +0200 (CEST) Date: Fri, 28 Jul 2000 20:58:24 +0200 (CEST) From: Paul Herman To: Matt Cc: freebsd-questions@FreeBSD.ORG Subject: Re: another date question In-Reply-To: <200007290007180515.01221B60@10.1.1.105> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sat, 29 Jul 2000, Matt wrote: > I was after how to get date to report the number of > days until a certian date. Is this possible with > date? As you know, in UNIX there are many ways to do one thing. One way I can think of (until X-Mas for example): echo "(`date -v 12m -v 31d -v 0H +%s`-`date +%s`)/60/60/24" | bc There's lots of other ways, I'm sure. Choose your language, /bin/sh, perl, awk, etc... -Paul. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message