以下行
FILE *fp=popen("ls -h --full-time | awk '{printf \" %-70s%-10s%-20s%-30s\n \", $9,$5,$6,$7}' ","r");
给出错误
awk:第 1 行:失控字符串常量“%-70s%-10....
我也试过
FILE *fp=popen("ls -h --full-time | awk \'{printf \" %-70s%-10s%-20s%-30s\n \", $9,$5,$6,$7}\' ","r");
还是同样的错误。
我知道它与引号有关。只是我无法弄清楚到底是什么。如何摆脱错误?谢谢。