大神们谁遇到过这种奇葩问题:
采用system 调用系统命令出错:
char *command =  "ps aux |sort -nr -k 4|sort -nr -k 3|head -n 12 | grep -v "USER"| awk '{printf "%-10s %-10s %-10s %-10s\n",$1,$2,$3,$11}'"
FILE *fp = popen(command,"r");
编译错误:
:55:81: error: expected ‘,’ or ‘;’ before ‘USER’
:55:105: error: invalid suffix "s" on integer constant
:55:111: error: invalid suffix "s" on integer constant
:55:117: error: invalid suffix "s" on integer constant
:55:123: error: invalid suffix "s" on integer constant
: error: stray ‘\’ in program在控制台窗口单独执行该命令没有问题