console - Powershell pipeline commands not work concurrently -


when run 2 commands connected 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 started run after cmda finished, behavior different compare cmd.exe, 2 commands expected work simultaneously producer-consumer. when 1st 1 has lot of messages output, want result @ first time rather after completion of 1st cmd.

[updated on 2016/08/09] after few more investigation, guess problem because pipeline operator '|' works different. time created huge text file copy&paste (~50mb) , used same command line both cmd , powershell:

c:\tools\msys2\usr\bin\cat.exe .\windowsupdate.log | c:\tools\msys2\usr\bin\cat.exe 

i used cat command msys2 , avoid `type' command different on both shells.

in cmd, messages printed in powershell waited ~30 seconds see messages come out. tried 10 times , got same result. (ps: i'm not using ssd). if in powershell changed receiver `cat' out-host, works fine.


Comments

Popular posts from this blog

Spring Boot + JPA + Hibernate: Unable to locate persister -

go - Golang: panic: runtime error: invalid memory address or nil pointer dereference using bufio.Scanner -

c - double free or corruption (fasttop) -