Chinaunix首页 | 论坛 | 博客
  • 博客访问: 444370
  • 博文数量: 293
  • 博客积分: 4204
  • 博客等级: 上校
  • 技术积分: 3060
  • 用 户 组: 普通用户
  • 注册时间: 2010-03-21 10:27
个人简介

nobody

文章分类

全部博文(293)

文章存档

2014年(27)

2013年(105)

2012年(41)

2011年(109)

2010年(11)

分类: Python/Ruby

2011-06-25 10:27:07

A pipe mark (|) causes the output of the first command (on the left) to be sent to the second program (on the right) just as if the 1st program output would be regular stdin (for example written with a keyboard) for the 2nd program.

By far, the most useful and powerful thing you can do with I/O redirection is to connect multiple commands together with what are called pipes. With pipes, the standard output of one command is fed into the standard input of another

A greater-than mark (>) causes the output of the program on the left to be sent to a file described on the right side of the mark.

A less-than mark (<) works the other way around, it causes the contents of the file described on the right side of the mark to be fed to the program on the left side as if the file contents would be regular stdin for the program (like you would write the file contents for the program yourself)
阅读(1411) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~