【发布时间】:2016-12-09 01:35:23
【问题描述】:
我有一个包含文件名列表的 txt 文件,其中包含文件路径。如何将所有文件合并为一个文件?
前:
One.txt content >> first file content
two.txt content >> second file content
three.txt content >> third file content
allFiles.txt contains these the below lines
one.txt
two.txt
three.txt
我需要将 allFiles.txt 连接到包含以下行的 output.txt 文件
first file content
second file content
third file content
【问题讨论】:
-
你真的需要 sed 吗?
cat allFiles.txt | xargs cat应该这样做。 -
cat allFiles.txt | xargs 猫 >> output.txt。它有效