Chaining and piping?

May 20, 2008
9,554
64
Syracuse, NY, USA
I was very surprised to find that this doesn't work. It's old behavior and it doesn't agree with how CMD behaves.

Code:
v:\> type b1.bat
@echo off
b2.bat | findstr foo

v:\> type b2.bat
@echo off
echo foo
echo bar

v:\> b1.bat
foo
bar

v:\> cmd /c b1.bat
foo

v:\>
 
May 20, 2008
9,554
64
Syracuse, NY, USA
No one needs to do that. One can always
Code:
call other.btm | blah
quit
The pipe works fine with CALL. Since it was at the end of my BTM, just running it (without CALL) was the first thing that came to mind.