0

I have this existing command:

xcodebuild | tee "$MY_TEMP_FILE_PATH" >> "$MY_LOG_FILE_PATH"

i.e.

stderr -> log file
          temp file
          normal console output

stdout -> log file 
          temp file
          (no normal console output)

I want to add on OCUnit2JUnit. Their example has this suffix: 2>&1 | ocunit2junit. However I want to integrate with my existing redirects, so the mapping will be:

stderr -> log file 
          temp file
          normal console output
          OCUnit2JUnit

stdout -> log file 
          temp file
          OCUnit2JUnit
          (no normal console output)

Is this possible?

Robert
  • 37,670
  • 37
  • 171
  • 213
  • Pretty related: [osx/linux: pipes into two processes?](http://stackoverflow.com/q/10218103/1983854) – fedorqui Oct 16 '14 at 10:59
  • Why You need such redirection? – Opal Oct 16 '14 at 13:17
  • @Opal - `XCodeBuild` produces a lot of noisy output for the build server. The only really useful thing is the `stderr` output. However, occasionally it is useful to check the full log. The next command I run filters the test output from `stdout` and deletes the temp file. `OCUnit2JUnit` seems useful so I want to add this on. Perhaps, the requirements can be simplified a little if this is not possible. – Robert Oct 16 '14 at 13:28

0 Answers0