1

Ok so I have this script where I redirect the output of an ant command to a pipe with findstr

ant xyz | findstr ...

but as you know the output of the command will not get displayed on the stdout. So is there a way that we can redirect the output to both the pipe and stdout without using files?

minus
  • 13
  • 1
  • 4
  • 1
    Not built into Windows that I'm aware of... you need the equivalent of a Unix program called `tee` (that forms a T-junction in a pipe) that will send its input both to stdout and further down the pipe. You should be able to find Windows versions kicking around the net (Cygwin, Git tools etc.) – TripeHound Feb 16 '17 at 13:41
  • 2
    check the `jtee` implementation of the tee command for windows - http://stackoverflow.com/a/10719322/388389 – npocmaka Feb 16 '17 at 13:49
  • Just to add some more references [mtee](https://ritchielawrence.github.io/mtee/) [Bill Stewart's Tee](http://www.westmesatech.com/sst.html) [GnuWin32 Tee](http://gnuwin32.sourceforge.net/packages/coreutils.htm) –  Feb 16 '17 at 14:46

0 Answers0