摘要: APUE 3.5关于重定向有个容易迷惑人的问题:./a.out > outfile 2>&1./a.out 2>&1 > outfile问两者区别。自己试了下, int main(){ printf("output to stdio\n"); fprintf(stderr,"output to stderr\n"); return 1;}// 结果如下:$ ./a.out > outfile 2>&1$ cat outfileoutput to stderroutput to stdin$ ./ 阅读全文
posted @ 2012-10-22 10:01 aitao 阅读(1004) 评论(0) 推荐(0) 编辑