linux - "sort < output"和 "sort output"之间的区别

标签 linux io

我只想知道它们之间的区别:

sort < output

sort output

在 Linux 中。它是如何工作的?

最佳答案

这已经在 unix.stackexchange 上讨论过:Performance difference between stdin and command line argument

sort < file shell 执行重定向。它打开文件并传递 stdin sort 的文件描述符读取它的命令。

sort file , sort命令打开文件然后读取它。

关于linux - "sort < output"和 "sort output"之间的区别,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7307759/

相关文章:

c - 'constant database' 的快速索引格式

Java在前台打开一个vi编辑器

Python:安装 pip 时出现权限被拒绝错误

c#搜索大文本文件

java - 如何保证一个I/O流的关闭?

python - IOerror 的 "causes"是什么

linux - 如何在 Linux 上静默安装 IBM BPM 8.5.6

linux - 附加了 '~' 的 Debian 重复文件

python - 为什么 takewhile() 会跳过第一行?

java - 如何打开文件并查看它