Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 14 Aug 2006 11:35:28 +0200
From:      des@des.no (Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?=)
To:        Julian Elischer <julian@elischer.org>
Cc:        current@freebsd.org
Subject:   Re: suggested addition to 'date'
Message-ID:  <868xlrwtgf.fsf@xps.des.no>
In-Reply-To: <44DD4510.5070002@elischer.org> (Julian Elischer's message of "Fri, 11 Aug 2006 20:03:44 -0700")
References:  <44DD4510.5070002@elischer.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Julian Elischer <julian@elischer.org> writes:
> At various times I've wanted to add timestamps to logfiles as they
> are generated..

while read line ; do echo $(date '+%Y-%m-%d %H:%M:%S') "$line" ; done

DES
--=20
Dag-Erling Sm=F8rgrav - des@des.no



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?868xlrwtgf.fsf>