#1396: Display prompts of executed commands ----------------------------+----------------------------------------------- Reporter: rhaas | Owner: eric9 Type: enhancement | Status: reopened Priority: optional | Milestone: Component: GetComponents | Version: development version Resolution: | Keywords: ----------------------------+-----------------------------------------------
Comment (by rhaas):
Using only bash and tee you need something like this: {{{ exec 3>&1 { exec 4>&1 ls -lR 2>&4 | tee stdout >&3 } | tee stderr >&2 }}}
which will capture ls's stdout in the file stdout and its stderr in the file stderr and output each stream to the console as well. I have used something like this for quite a while to capture make's output.