How to redirect command output - general reference wanted...
-
system(3) - Linux manual page[^]
This is somewhat a dupe, so if it bothers you...( I am not allowed to give instructions ...) I am asking for generic / general help in capturing Linux command output. I am going to use this as an example:
system("hcitool dev | cut -sf3 ");
I know what is does - that is NOT of my concern.. I can see the result in (Qt) console... I do not know HOW - what "hidden" code (std??) put the actual result of the call onto console and how can I redirect such call for my purpose ? I did RTFM for "system" and found NO references , or missed them, on how to capture THE actual output of the command. that said - what would be SUCCESSFUL phrase to ask Mrs Google to give me a general Linux resource ( text book ?) to cover "standard output / input / error " and how to figure out if the command uses
"standard output / input / error "
and how to access it in C/C++ ..all this just for learning purpose CHEERS THANks
-
system(3) - Linux manual page[^]
This is somewhat a dupe, so if it bothers you...( I am not allowed to give instructions ...) I am asking for generic / general help in capturing Linux command output. I am going to use this as an example:
system("hcitool dev | cut -sf3 ");
I know what is does - that is NOT of my concern.. I can see the result in (Qt) console... I do not know HOW - what "hidden" code (std??) put the actual result of the call onto console and how can I redirect such call for my purpose ? I did RTFM for "system" and found NO references , or missed them, on how to capture THE actual output of the command. that said - what would be SUCCESSFUL phrase to ask Mrs Google to give me a general Linux resource ( text book ?) to cover "standard output / input / error " and how to figure out if the command uses
"standard output / input / error "
and how to access it in C/C++ ..all this just for learning purpose CHEERS THANks