when run two commands which connected with a pipeline
PS> cmdA | cmbB
e.g.
1) in powershell
PS> ls -Recurse | more
2) in CMD.exe
C:\> dir /s | more
you'll find in powershell cmdB is started to run after cmdA finished, this behavior is different compare to CMD.exe, the two commands is expected to work simultaneously as producer-consumer. especially when the 1st one has a lot of messages to output, you want to look into the result at the first time rather than after the completion of the 1st cmd.
[Updated on 2016/08/09] after few more investigation, i guess the problem is because the pipeline operator '|' works different. this time i created a huge text file by copy&paste (~50MB) and used a same command line for both CMD and Powershell:
C:\tools\msys2\usr\bin\cat.exe .\WindowsUpdate.log | C:\tools\msys2\usr\bin\cat.exe
I used the cat command from msys2 and avoid the `type' command as they are different on both shells.
in CMD, messages are printed immediately but in Powershell i waited ~30 seconds to see messages come out. I tried about 10 times and got the same result. (PS: i'm not using a SSD). But if in Powershell i changed the receiver from `cat' to Out-Host, it works fine.