Linux Shell Scripting Cookbook(Third Edition)
上QQ阅读APP看书,第一时间看更新

There's more...

Commands that read input from stdin can receive data in multiple ways. It is possible to specify file descriptors of our own, using cat and pipes. Consider this example:

$ cat file | cmd
$ cmd1 | cmd2