I tried to find possible solution on Google, but all I found is explanation on how to return value, but not how to accept it in some programming language, in my case C/C++? Does anybody have idea on how to do this? Some tips?
closed as off-topic by muru, chaos, Archemar, cuonglm, G-Man Sep 23 '15 at 8:28
|
|
I'm focussing on Linux, but my answer probably fits for other POSIX systems. You'll execute your shell script from a C or C++ program with some of:
Both Read any good book on Linux system programming for details (e.g. Advanced Linux Programming by M.Mitchell et al; you'll find copies on the Web, or APUE etc...) |
|||||||||
|
EXIT_SUCCESS
so is for success. – Basile Starynkevitch Sep 23 '15 at 7:53