Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a simple call command

call calabash -D sim.xpl >test.txt 2>&1

and this redirects into test.txt, how do I do both redirect into a file and allow it to show up in the prompt?

(I could use the command for both linux and windows)

(use case: tar-ring a backup takes a while and watching the the verbose output allows me to keep an eye on it, and kill it early if needed, rather than to open a large file or wait until its done)

share|improve this question
up vote 5 down vote accepted


call calabash -D sim.xpl 2>&1 | tee test.txt
share|improve this answer
that just copies to multiple files (learned something new) but is it possible to keep the IO in the prompt and copy it to a file? – jtzero Oct 19 '10 at 20:22
@jtzero, did you try? What multiple output files do you see in Ignacio's command line? – Arjan Oct 19 '10 at 20:25
tee outputs its input to stdout. Just don't do something silly like redirecting it somewhere else. – Ignacio Vazquez-Abrams Oct 19 '10 at 20:25
call calabash -D sim.xml 2>&1 >( tee test.txt ) may do what you want. Due to buffering methods you may not see the prompt until you respond to it. – BillThor Oct 19 '10 at 20:28
Sure, if you pass multiple files to tee then it will copy the output to multiple files. But also to stdout. – Ignacio Vazquez-Abrams Oct 20 '10 at 1:59

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.