摘要:
shell c 混合编程 system 输出数据到变量方法一: (popen)#include <stdio.h>#include <stdlib.h>int main( int argc, char *argv[] ){ FILE *fp; int status; char path[1035]; /* Open the command for reading. */ fp = popen("/bin/ls /etc/", "r"); if (fp == NULL) { printf("Failed to run co 阅读全文
摘要:
sed -i "s/dhcp/static/g" /etc/network/interfaces dhcp原字符串 static 新字符串 /etc/network/interfaces文件名 阅读全文