的bash shell脚本结合* .TXT成一个文件 [英] bash shell scripting combining *.txt into one file
本文介绍了的bash shell脚本结合* .TXT成一个文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
什么是所有的* .txt文件合并在一个目录到一个大的文本文件,最快捷,最务实的方式?
What is the quickest and most pragmatic way to combine all *.txt file in a directory into one large text file?
目前我使用Windows与Cygwin的,所以我有机会获得BASH。
Currently I'm using windows with cygwin so I have access to BASH.
Windows外壳命令也会更好,但我怀疑有一个。
Windows shell command would be nice too but I doubt there is one.
推荐答案
这追加输出到全部.txt
This appends the output to all.txt
cat *.txt >> all.txt
这将覆盖全部.txt
This overwrites all.txt
cat *.txt > all.txt
这篇关于的bash shell脚本结合* .TXT成一个文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文