From owner-freebsd-current@FreeBSD.ORG Sat Aug 12 20:35:16 2006 Return-Path: X-Original-To: current@freebsd.org Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9D6C916A4DA for ; Sat, 12 Aug 2006 20:35:16 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from igloo.linux.gr (igloo.linux.gr [62.1.205.36]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9269943D5C for ; Sat, 12 Aug 2006 20:35:08 +0000 (GMT) (envelope-from keramida@ceid.upatras.gr) Received: from gothmog.pc (host5.bedc.ondsl.gr [62.103.39.229]) (authenticated bits=128) by igloo.linux.gr (8.13.7/8.13.7/Debian-2) with ESMTP id k7CKYbpO020362 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sat, 12 Aug 2006 23:34:38 +0300 Received: from gothmog.pc (gothmog [127.0.0.1]) by gothmog.pc (8.13.7/8.13.7) with ESMTP id k7CKYbOa007476; Sat, 12 Aug 2006 23:34:37 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Received: (from giorgos@localhost) by gothmog.pc (8.13.7/8.13.7/Submit) id k7CKYW4M007475; Sat, 12 Aug 2006 23:34:32 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Date: Sat, 12 Aug 2006 23:34:32 +0300 From: Giorgos Keramidas To: Julian Elischer Message-ID: <20060812203432.GA5007@gothmog.pc> References: <3892.1155412387@critter.freebsd.dk> <44DE3531.7040308@elischer.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="wRRV7LY7NUeQGEoC" Content-Disposition: inline In-Reply-To: <44DE3531.7040308@elischer.org> X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (score=-3.826, required 5, autolearn=not spam, ALL_TRUSTED -1.80, AWL 0.57, BAYES_00 -2.60) X-Hellug-MailScanner-From: keramida@ceid.upatras.gr X-Spam-Status: No X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Poul-Henning Kamp , current@freebsd.org Subject: Re: suggested addition to 'date' X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Aug 2006 20:35:16 -0000 --wRRV7LY7NUeQGEoC Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On 2006-08-12 13:08, Julian Elischer wrote: > Poul-Henning Kamp wrote: > > Why would you need to include "the whole of 'date'" ? Have you > > never heard of strftime(3) ? > > Of course but I think it makes more sense to add the ability > for date to be able to put the date onto a stream than to write > a whole new program for it, and date does extra work not > included in strftime() that it would be nice to have. > > It could be said that adding a strftime() to 'cat' as an option > is equally possible but that would be much more disruptive than > adding filterring to date, as cat is not line oriented, Exactly. Seeing that cat is not line-oriented I wrote at least two different filters at various times, which were inspired by the tinderbox log format. The one was the Perl line-based one which I posted upthread. The other one was in plain C, and is attached. It doesn't do the fancy date-conversion stuff that date(1) can do, but please feel free to rip it off if you find anything useful in there for the date(1) patch. > BTW. I agree that the last patch I gave was overly complicated > and a much simpler one is possible.. Basically, Giorgos's > suggested patch is pretty close to being right. Or we can adapt this until it is right ;-) --wRRV7LY7NUeQGEoC--