On 01/11/15 22:57, Evan Rempel wrote:
> There is a lot of discussion on the net about prefacing a timestamp to 
> every line of a text stream. There are solutions with awk, perl, python 
> and bash. coreutils even provides one using perl. This seems to be a 
> very heavy tool to do something that date already does all of the hard 
> work for.
> 
> Does it make sense to add an option -p --prefix to make date prefix 
> every line of stdin with a date/time stamp?

It's useful functionality, though already available using other tools.
http://stackoverflow.com/q/21564/4421
The general rule we use is to not couple logic
unless it provides a functional benefit to do so.
Personally I like the awk solution presented above.

cheers,
Pádraig.


Reply via email to