免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
楼主: r2007
打印 上一主题 下一主题

shell的输入与输出  关闭 [复制链接]

论坛徽章:
0
1 [报告]
发表于 2005-08-02 22:06 |显示全部楼层

shell的输入与输出

Redirector Function

cmd1 | cmd2
Pipe; take standard output of cmd1 as standard input to cmd2

> file
Direct standard output to file

< file
Take standard input from file

>> file
Direct standard output to file; append to file if it already exists

>| file
Force standard output to file even if noclobber is set

n>| file
Force output to file from file descriptor n even if noclobber is set

<> file
Use file as both standard input and standard output

n<> file
Use file as both input and output for file descriptor n

<< label
Here-document; see text

n> file
Direct file descriptor n to file

n< file
Take file descriptor n from file

n>> file
Direct file descriptor n to file; append to file if it already exists

n>&
Duplicate standard output to file descriptor n

n<&
Duplicate standard input from file descriptor n

n>&m
File descriptor n is made to be a copy of the output file descriptor

n<&m
File descriptor n is made to be a copy of the input file descriptor

&>file
Directs standard output and standard error to file

<&-
Close the standard input

>&-
Close the standard output

n>&-
Close the output from file descriptor n

n<&-
Close the input from file descriptor n
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP