Hello everyone,
I was wondering is it possible to use system() and put the results into a variable. For example,
The output of this is:Code:#include <stdio.h> int main (void) { char l; printf("Your libc version is:\n"); l = system("/lib/libc.so.6 | head -n1 | awk '{print $7}'"); printf("%s", l); }
Or do I need to use something else like excel or fork?Your libc version is:
2.5,
(null)
Thanks in advance,
Brad