所以基本上我想在c程序中执行bash命令并将整个输出分配给变量。
例如char *temp;
char *buf="ls -la";
temp=execute command stored in buf;
printf("%s",temp); /*print the whole output of the command*/
0 个答案:
没有答案
所以基本上我想在c程序中执行bash命令并将整个输出分配给变量。
例如char *temp;
char *buf="ls -la";
temp=execute command stored in buf;
printf("%s",temp); /*print the whole output of the command*/
0 个答案:
没有答案