私がやっている:
FILE *in;
extern FILE *popen();
char buff[512];
if (!(in = popen("df / | tail -n +2 | awk '{ print $1 }'", "r"))) {
exit(1);
}
while (fgets(buff, sizeof(buff), in) != NULL ) {
printf("Output: %s", buff);
}
それで、最後に追加の文字を追加して、これを関数に渡して操作できるbuff
ようにするにはどうすればよいですか?s0
char