I am currently working on moving some bash scripts over to C, and one of them call’s an external python script, so for instance ./remoteclient01a.py “remotecommand player /something something”
./remoteclient01a.py "remotecommand player /something something"
and Ive been looking for a way to execute this command in C, but Im not really sure as to which I should use, being that System() seems to be the best one, but then a few pages say that it is a bad choice in some cases, so if someone could recommend a method to do this I would really appreciate it, thanks!
The only portable ways to do this in C are
systemandpopen. The functionpopenallows you to read output from the command.