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)
阅读(1439) | 评论(0) | 转发(0) |