On 2006-09-02 23:33, Julian Elischer <julian_at_elischer.org> 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 :(Received on Tue Sep 05 2006 - 04:02:11 UTC
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:59 UTC