Deleuze_AT_gmx.net --> dwm (2007-06-22 18:23:55 +0200):
> Hackerz,
>
> I have one stream, that writes to stdout. Now I want to log it, works fine
> with a different pointer, but what's the best way to duplicate the existing stream that already is printed to stdout to a logfile? Of course, 2 fprintfs is no pr0n at all :)
You probably want tee(1).
HTH, Jukka
-- bashian roulette: $ ((RANDOM%6)) || rm -rf ~Received on Fri Jun 22 2007 - 18:27:14 UTC
This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 14:44:55 UTC