link c++ and bash?
Hi all,
I'd like to know if this is possible. I'm writing a C++ program that I want to run bash scripts. The thing is, I'd like to be able to take the result of the script and use it as a value in my C++ program. For instance, if the script failed (either because of an error, or because it acheived a value within itself that would return a failure) I'd like the C++ program to be able to take that value and use it. Is this possible? If so, how? Thanks |
Quote:
There are other techniques for IPC (inter-process communication), but in *NIX environments, the standard streams are some of the simplest to work with. |
And of course there's always "popen()": it'll read stdout from your script; it'll also read your script's "exit" status: whichever (or both) you prefer.
"man 3 popen", if you're interested. |
wow--thats awesome.
thanks so much guys!! |
All times are GMT -5. The time now is 10:17 PM. |