使用tr -d 'xyz' < file代替cat file | tr -d 'xyz'

来源:互联网 发布:淘宝40磅反曲弓 编辑:程序博客网 时间:2024/04/30 20:10


   $ cat file | tr -'xyz'

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

原创粉丝点击