zsh-users
 help / color / mirror / code / Atom feed
* Tee all output to log file?
@ 2011-02-01 23:41 Benjamin R. Haskell
  2011-02-02  0:12 ` Kurtis Rader
  2011-02-02  5:23 ` gi1242+zsh
  0 siblings, 2 replies; 3+ messages in thread
From: Benjamin R. Haskell @ 2011-02-01 23:41 UTC (permalink / raw)
  To: Zsh Users

For scripting purposes I occasionally want a way to both record and 
display all the output of a script.  On several occasions now, I've 
looked through the output redirection section of the manual, but I never 
come up with quite what I'm looking for.

Essentially, when I want this, I usually want something like:

#!/bin/zsh
(( $+logfile )) && exec |& tee $logfile

Boiled down even further, it's really just this I'm looking for:
exec |& tee logfile

Is there something straightforward that I'm overlooking?  Is there a 
commonly used utility for this?  (`script` comes to mind, but I recall 
klunkiness when trying it in the past.)

-- 
Best,
Ben


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-02-02  5:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-01 23:41 Tee all output to log file? Benjamin R. Haskell
2011-02-02  0:12 ` Kurtis Rader
2011-02-02  5:23 ` gi1242+zsh

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).