Inside my C code I call system to have result from a bash command.
system
I.e. system(ps aux | grep my_prog | head -n 1)
system(ps aux | grep my_prog | head -n 1)
Al