in reply to Re: I want to capture a programs output AND I want the return status
in thread I want to capture a programs output AND I want the return status
First of all it is different. Unless you control the external utility (which you probably don't because you didn't write it) you cannot make a change like that. And if you do you will confuse everyone else.
Secondly it is inflexible. There are lots of programs that have legitimate reasons to spit out reams of text that may include an OK in them.
Thirdly you often want to send a child program's output somewhere else but you still need to capture the return code.
That answer why your idea is not used more often?
|
|---|