0
A
回答
5
With cat < file
,cat
从其标准输入读取; shell会打开文件并将文件句柄连接到cat
。与cat file
,cat
本身打开文件没有任何shell介入。两者的最终结果确实相同:cat
读取file
的内容并将它们输出到标准输出。
+0
尼斯和准确,但我敢打赌,这一定是已经被问及在这里回答。 – GhostCat
+0
值得一提的是,这是特定于'cat'命令的行为;其他一些命令的行为方式相同。 –
相关问题
- 1. cat file | ... vs ... <文件
- 2. perl中的foreach x(cat file)?
- 3. unix中的cat文件名和cat <filename的区别
- 4. file .git和directory .git有什么区别?
- 5. <jsp:include page = ...>和<%@ include file = ...>之间有什么区别?
- 6. “./file”和“file”相对路径有什么区别
- 7. git config --list和cat .gitconfig有什么区别?
- 8. 在Python中,open(file).read()和subprocess(['cat',file])之间有什么区别,并且是否有一个优先于另一个?
- 9. 包含“file.h”与<file>有什么区别?
- 10. $ request-> file-> store($ path)和$ request-> file-> move($ path,$ filename)有什么区别?
- 11. grep vs cat和grep的区别
- 12. 在“while read -r line; do ...; done <file`和`cat file | while IFS = read -r line; do ...; done`之间bash之间有任何区别吗?
- 13. save-hook-hook和write-file-function之间有什么区别
- 14. Java中的File和FileLoader有什么区别?
- 15. 在IE中,File-> Save As和document.execCommand('SaveAs')有什么区别?
- 16. emacs中'M-x load-file'和'M-x load-library'有什么区别?
- 17. C#中的File和FileInfo有什么区别?
- 18. PowerShell:为什么“Get-Content <file> | Out-File -Andnd <file>”进入循环?
- 19. 什么是($ file eq'。'|| $ file eq'..')?
- 20. `cat <does_not_exist | perl`成功
- 21. 运行scala时出现“cat:/ release:No such file or directory”
- 22. Flume exec to cat file只写一行到hdfs sink
- 23. Linux在使用“cat”后返回“select:Bad file descriptor”错误
- 24. 通过cat和数据参数来卷曲数据有什么区别?
- 25. BASH,cat缓冲区
- 26. 为什么不使用<< EOF代替cat << EOF?
- 27. cat命令
- 28. URL“file://”和“http://”之间的区别是什么
- 29. “./file”名称和“../文件名”之间的区别是什么
- 30. 排序和计数的方法比cat file |更快排序| uniq -c
建议通过http://wiki.bash-hackers.org/howto/redirection_tutorial – Sundeep