Date: Mon, 4 Sep 2006 12:41:43 +0200 (CEST) From: Oliver Fromme <olli@lurza.secnetix.de> To: gad@FreeBSD.org (Garance A Drosehn) Cc: Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= <des@des.no>, freebsd-current@FreeBSD.org, jhb@FreeBSD.org Subject: Re: suggested addition to 'date' Message-ID: <200609041041.k84Afhb6075032@lurza.secnetix.de> In-Reply-To: <p06230928c11e2298ca97@[128.113.24.47]>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200609041041.k84Afhb6075032>