suggested addition to 'date'

Julian Elischer julian at elischer.org
Mon Aug 14 18:05:13 UTC 2006


Dag-Erling Smørgrav wrote:

>Julian Elischer <julian at 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
>
while this is true, if you had read the rest of the thread you would 
have seen the words
"without running date for every line".

I even said that it could be done using shell if one WAS willing to run 
date for each line.




More information about the freebsd-current mailing list