免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 3149 | 回复: 5
打印 上一主题 下一主题

请问一个SHELL [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2003-03-13 11:27 |只看该作者 |倒序浏览
22>;&1

是什么意思,作用,请大哥详解

论坛徽章:
0
2 [报告]
发表于 2003-03-13 12:22 |只看该作者

请问一个SHELL

标准的错误输出也输出到标准输出.

0 标准输入
1 标准输出
2 标准的错误输出

论坛徽章:
0
3 [报告]
发表于 2003-03-16 08:14 |只看该作者

请问一个SHELL

Hi,

To explain the \"2>;&1\", the best way is to use an example:

# ls /home/laoli/nosuchfile >; /tmp/output 2>;&1

The above command says: list the file /home/laoli/nosuchfile, save the output (standard output; in Unix the file descriptor is \"1\" to a file called /tmp/ouput; if there is any error in the process, save the error (standard error; in Unix the file descriptor is 2) to the standard output also. (In this case, since the standard output is already sent to /tmp/output, therefore the error will be sent to /tmp/output too).

Hope this helps.

论坛徽章:
0
4 [报告]
发表于 2003-03-16 11:08 |只看该作者
提示: 作者被禁止或删除 内容自动屏蔽

论坛徽章:
0
5 [报告]
发表于 2003-03-16 17:20 |只看该作者

请问一个SHELL

原帖由 \"sql2000\" 发表:
标准的错误输出也输出到标准输出.

0 标准输入
1 标准输出
2 标准的错误输出


这位老兄说的对。。。

论坛徽章:
0
6 [报告]
发表于 2003-03-17 08:34 |只看该作者

请问一个SHELL

到精华区看我的那篇文章“关于2>;&1等重定向的详细解释”!
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP