摘要: 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 阅读全文
posted @ 2012-02-08 13:47 wangkangluo1 阅读(1230) 评论(0) 推荐(0) 编辑
摘要: sed -i "s/dhcp/static/g" /etc/network/interfaces dhcp原字符串 static 新字符串 /etc/network/interfaces文件名 阅读全文
posted @ 2012-02-08 10:00 wangkangluo1 阅读(370) 评论(0) 推荐(0) 编辑