From owner-freebsd-current@FreeBSD.ORG Tue Sep 5 06:02:11 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 E282016A4DF for ; Tue, 5 Sep 2006 06:02:11 +0000 (UTC) (envelope-from keramida@freebsd.org) Received: from igloo.linux.gr (igloo.linux.gr [62.1.205.36]) by mx1.FreeBSD.org (Postfix) with ESMTP id E41CF43D60 for ; Tue, 5 Sep 2006 06:02:05 +0000 (GMT) (envelope-from keramida@freebsd.org) 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 k8561a4l009907 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 5 Sep 2006 09:01:38 +0300 Received: from gothmog.pc (gothmog [127.0.0.1]) by gothmog.pc (8.13.7/8.13.7) with ESMTP id k8561vW2084896; Tue, 5 Sep 2006 09:01:58 +0300 (EEST) (envelope-from keramida@freebsd.org) Received: (from giorgos@localhost) by gothmog.pc (8.13.7/8.13.7/Submit) id k8561soc084895; Tue, 5 Sep 2006 09:01:54 +0300 (EEST) (envelope-from keramida@freebsd.org) Date: Tue, 5 Sep 2006 09:01:54 +0300 From: Giorgos Keramidas To: Julian Elischer Message-ID: <20060905060154.GA84448@gothmog.pc> References: <200608281545.k7SFjn6l063922@lurza.secnetix.de> <200609020956.54008.Lucas.James@ldjcs.com.au> <20060902031247.GE749@turion.vk2pj.dyndns.org> <44FA7720.5040304@elischer.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <44FA7720.5040304@elischer.org> X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (score=-3.016, required 5, autolearn=not spam, AWL -0.42, BAYES_00 -2.60, UNPARSEABLE_RELAY 0.00) X-Hellug-MailScanner-From: keramida@freebsd.org X-Spam-Status: No Cc: Peter Jeremy , freebsd-current@freebsd.org, Lucas James 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: Tue, 05 Sep 2006 06:02:12 -0000 On 2006-09-02 23:33, Julian Elischer wrote: >Peter Jeremy wrote: >> >> Firstly, we already have this: >> sed "s=^=$(date)=" file >> >> And secondly, this pre-pends a fixed string. What's wanted is a filter >> to prepend a time/date stamp (which varies) to the input stream. >> >> The justification for extending date(1) is that it already has the code >> to handle date/time stamps. In reality, this code is all in strftime(3) >> and cat(1) already has hooks to insert a string at the beginning of a >> line so I believe that the attached patch is more appropriate. (Man >> page update on request). > > I look forward to this commit.. > (I don't care where I get the capacity from as long as I can datestamp > files) > > puting it in 'tee' is also an option.. timestamping the 'file' output. Which is pointless and shows why this bikeshed is never going to be purple. Why do we have to bloat tee(1) with something that makes the 'file' output different from the screen output (effectively making both of them useless, as it breaks the very-nature of tee(1))? The same effect, without *any* sort of functionality loss, can be obtained with: # command 2>&1 | tslog | tee logfile where 'tslog' is a proper 'timestamping' filter. What are we going to modify next, cc(1) to output timestamped error and warning messages? The more this thread goes on, the more my opinion tends to be that this belongs to a standalone filter, examples of which a lot of people have posted already :(