您的位置:首页 > 文档 > Shell >
 文章分类 

重定向一例


创建:2005-10-26 00:49:45
作者:Unlinux
来自: http://www.Unlinux.com

xec 3>&1; grep yyy xxx 2>&1 1>&3 3>&-
我的理解是

1: fd3 redirect to 1,
2. grep 的 stderr & stdout redirect to 1, then 关闭 fd3

但还是不明白,为什么 3>&1 后来又 1>&3 最后又 3>&1

转载自:http://www.unlinux.com/doc/shell/20051026/238.html

评论】 【加入收藏夹】 【 】 【打印】 【关闭
 *  请尊重我们的劳动,转载请注明出自UnLinux.Com及作者名 * 

※ 相关链接
 ·重定向  (2005-10-26 00:49:45)
 ·重定向是什么  (2005-10-26 00:49:45)

Copyright © 2005 UnLinux.Com All Rights Reserved