$ cat file | tr -d 'xyz'
- runs two processes, one for cat and one for tr. This is less
- efficient than
- 两个进程
- $ tr -d 'xyz' < file
- in general, "cat file | somecommand" can be more efficiently
- replaced by "somecommand < file" or (especially for multi-file input)
- $ somecommand file [file ...]
- cat file1 file2
- 只有多个文件的时候cat的效率才比<高