zsh-users
 help / color / mirror / code / Atom feed
* Multios redirection while keeping current descriptors, and exec
@ 2022-05-10 18:20 Zach Riggle
  2022-05-10 18:49 ` John Covici
  2022-05-10 18:54 ` Bart Schaefer
  0 siblings, 2 replies; 3+ messages in thread
From: Zach Riggle @ 2022-05-10 18:20 UTC (permalink / raw)
  To: Zsh Users

[-- Attachment #1: Type: text/plain, Size: 456 bytes --]

Hello all!

Is there a simpler way to additionally log stdout/stderr to a file, while
keeping the existing one?

    { echo stdout; >&2 echo stderr } > /tmp/log > /dev/tty 2> /tmp/err
2>/dev/tty

Will log stdout to stdout and /tmp/log, for example.

Specifically, I want to be able to do this for the remainder of the process
via "exec".  The goal is to have an interactive stdio like normal, but also
log all stdout / stderr to a log file.

*Zach Riggle*

[-- Attachment #2: Type: text/html, Size: 793 bytes --]

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

end of thread, other threads:[~2022-05-10 18:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-10 18:20 Multios redirection while keeping current descriptors, and exec Zach Riggle
2022-05-10 18:49 ` John Covici
2022-05-10 18:54 ` Bart Schaefer

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).