#include<stdio.h>
#include<string.h>
/**************************
*函數說明:獲取shell程序的輸出內容
*輸入參數:
const char *commond,命令
char*buf,接收內容buf
int buf_len, 接受內容最大長度
*輸出函數:無
**************************/
void runcmd(const char *commond, char*buf, int buf_len)
{
FILE *fp = NULL;
memset(buf, 0 ,buf_len);
fp = poen(commond,"r");
fread(buf, 1, buf_len, fp)
pclose(fp);
}