Quantcast
Channel: Active questions tagged windows - Super User
Viewing all articles
Browse latest Browse all 8949

How to get the return value of pipe and executable on Windows

$
0
0

I am running some unit tests which involve piping into my executable, like this.

cat text.txt | my_exe --options

Running these commands, how do I get the return value of my_exe? Even when my_exe returns failure, the return value is discarded. I assume the return value of cat is prioritized instead.

Asked another way, how do I execute the above pipe command to give the same return value as :

cat text.txt && my_exe --options

ty!


Viewing all articles
Browse latest Browse all 8949

Trending Articles