BTMs and pipes ...?

May 20, 2008
10,618
81
Syracuse, NY, USA
What's happening below? "test1.btm | grep bar" works as I'd expect. But executing the same command in test2.btm doesn't.

Code:
v:\> type test1.btm
echo foo
echo bar

v:\> test1.btm | grep bar
bar

v:\> type test2.btm
test1.btm | grep bar

v:\> test2.btm
foo
bar
 
Aug 23, 2010
586
7
That's not quite right.
TCC-RT 24.02.49 x64 Windows 7 [Version 6.1.7601]
Easily reproducible.
grep in my case is a Cygwin one.

Code:
VER /R

TCC-RT  24.02.49 x64   Windows 7 [Version 6.1.7601]
TCC-RT Build 49   Windows 7 Build 7601  Service Pack 1
which grep
grep is an external : C:\Programs\Cygwin_64\bin\grep.EXE
test1.btm
echo foo
foo
echo bar
bar