Is it possible to use system() and get the return value from the system call
I wanted to do something like this:
buffer = system(/sbin/ifconfig eth0); this isnt exactly what i'm doing but i have a script that when run from the prompt it returns the IPaddr of eth0. I would like the characters that usually are printed to the screen to be thrown into a local buffer in my C code. can this be done with system or should i use exec or anything else? Thank you in advance, I really appreciate all of your help. |
man popen()
|
All times are GMT -5. The time now is 08:28 AM. |