From owner-freebsd-current@FreeBSD.ORG Mon Sep 4 10:42:19 2006 Return-Path: X-Original-To: freebsd-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 1350D16A511; Mon, 4 Sep 2006 10:42:19 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (lurza.secnetix.de [83.120.8.8]) by mx1.FreeBSD.org (Postfix) with ESMTP id F2D1343D62; Mon, 4 Sep 2006 10:41:52 +0000 (GMT) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (dqfmhm@localhost [127.0.0.1]) by lurza.secnetix.de (8.13.4/8.13.4) with ESMTP id k84AfhoC075034; Mon, 4 Sep 2006 12:41:48 +0200 (CEST) (envelope-from oliver.fromme@secnetix.de) Received: (from olli@localhost) by lurza.secnetix.de (8.13.4/8.13.1/Submit) id k84Afhb6075032; Mon, 4 Sep 2006 12:41:43 +0200 (CEST) (envelope-from olli) From: Oliver Fromme Message-Id: <200609041041.k84Afhb6075032@lurza.secnetix.de> To: gad@FreeBSD.org (Garance A Drosehn) Date: Mon, 4 Sep 2006 12:41:43 +0200 (CEST) In-Reply-To: X-Mailer: ELM [version 2.5 PL8] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.1.2 (lurza.secnetix.de [127.0.0.1]); Mon, 04 Sep 2006 12:41:49 +0200 (CEST) X-Mailman-Approved-At: Mon, 04 Sep 2006 12:35:08 +0000 Cc: Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= , freebsd-current@FreeBSD.org, jhb@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: Mon, 04 Sep 2006 10:42:19 -0000 I'm sorry for the late reply. I usually don't touch any computer on weekends. Garance A Drosehn wrote: > Oliver Fromme wrote: > > John Baldwin wrote: > > > Oliver Fromme wrote: > > > > There's another possibility, which doesn't require a new > > > > option letter at all. You could add a new escape sequence > > > > to the format string, e.g. "%*". Whenever date(1) is > > > > called with a format string containing that sequence, it > > > > goes into filter mode and replaces the sequence with the > > > > current line. > > Note that the main objection to this option (at least from my > point of view) is that date should not be going into filter > mode. Not ever. Date is a command to set or display dates. It already has a lot of additional uses which make it a generic tool to manipulate date and time stamps, far beyong setting or displaying the current date. For example, see the -f, -j and (especially) -v options. > It is not a command to filter files. 'cat' would be a more > appropriate place to add this option. But on the other hand, cat(1) is not a command to format and manipulate time stamps. You would have to add many of date's options to cat in order to make it useful. For example, suppose you want to add timestamps with offsets to a stream: date(1) can already do that (-v option). It doesn't make sense to add 90% of date's code to cat. But adding filtering to date(1) is just a few lines of code. Best regards Oliver -- Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing Dienstleistungen mit Schwerpunkt FreeBSD: http://www.secnetix.de/bsd Any opinions expressed in this message may be personal to the author and may not necessarily reflect the opinions of secnetix in any way. > Can the denizens of this group enlighten me about what the > advantages of Python are, versus Perl ? "python" is more likely to pass unharmed through your spelling checker than "perl". -- An unknown poster and Fredrik Lundh