From owner-freebsd-current@FreeBSD.ORG Thu Aug 17 17:12:27 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 6D1A516A4E0 for ; Thu, 17 Aug 2006 17:12:27 +0000 (UTC) (envelope-from b.candler@pobox.com) Received: from rune.pobox.com (rune.pobox.com [208.210.124.79]) by mx1.FreeBSD.org (Postfix) with ESMTP id 70B6743D8E for ; Thu, 17 Aug 2006 17:12:20 +0000 (GMT) (envelope-from b.candler@pobox.com) Received: from rune (localhost [127.0.0.1]) by rune.pobox.com (Postfix) with ESMTP id 5DDBD7BA54; Thu, 17 Aug 2006 13:12:40 -0400 (EDT) Received: from thinkdog.local.linnet.org (host212-183-132-77.uk.access.vodafone.net [212.183.132.77]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by rune.sasl.smtp.pobox.com (Postfix) with ESMTP id C33287BF05; Thu, 17 Aug 2006 13:12:33 -0400 (EDT) Received: from lists by thinkdog.local.linnet.org with local (Exim 4.50 (FreeBSD)) id 1GDlPW-0000FG-Nk; Thu, 17 Aug 2006 18:12:02 +0100 Date: Thu, 17 Aug 2006 18:12:02 +0100 From: Brian Candler To: Julian Elischer Message-ID: <20060817171202.GB671@uk.tiscali.com> References: <44DD4510.5070002@elischer.org> <20060816131824.67a8053b.algardo@sura.ru> <44E38F2C.8000207@elischer.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <44E38F2C.8000207@elischer.org> User-Agent: Mutt/1.4.2.1i Cc: Aleksey Perov , freebsd-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: Thu, 17 Aug 2006 17:12:27 -0000 On Wed, Aug 16, 2006 at 02:33:32PM -0700, Julian Elischer wrote: > I can not install ports onto these machines. They are appliances. > > I will simply put the unhancement in out own cvs tree, and the > enhancement will be private. > I'm still comletely amazed that no-one but me thinks this is a good idea > as it seems absolutly > obvious to me and it doesn't affect date's usual behaviour in the > slightest. FWIW I am also against, in a non-vehement way. My reasons are: 1. I don't like to encourage the writing of non-portable scripts, which will run on FreeBSD but not Linux, any other *BSD or indeed any other Unix in existence. Linux scripts which start #!/bin/sh but use bash-isms are particularly annoying... scripts which rely on non-standard additions to core utilities are also a pain. (I'm not a POSIXLY_CORRECT extremist though. I apply my own woolly definition of 'standard' here) 2. I object to feature bloat, not especially because it makes the core utilities and their manpages larger (we're only talking a few bytes in this particular case), but because it makes finding the right command and the right flag more difficult. Suppose you came along to a system knowing that there was a command somewhere to add timestamps to log streams, but couldn't remember what it was. I personally would never guess that it was "date" (*). 'man -k' wouldn't be able to find it, because this hidden feature is unlikely to make it into the one-line description. 3. One command doing many different things seems to go against the Unix philosophy of simple utilities doing one thing each. >From the point of view of (2) and (3), I'd rather than there was a completely separate utility for adding timestamps to streams, even if it shares 90% of its code with 'date'. 4. The other thing I'm uncomfortable with is that this modification to date does handles one specific type of timestamp addition - adding a timestamp to the start of a line, where lines are terminated by \n. Whilst this is a common case, it's certainly not the only case where I've wanted to add timestamps. That makes it feel like a special-case frig. Regards, Brian. (*) The nearest similar standard Unix command I can think of is nl(1)