You can try using the paste command to merge a large number of files: paste -d 'n' -s packages/*.txt > combine.txtpaste -d 'n' -s packages/*.txt > combine.txt
In fact, in some cases, the original file does not need to be actually divided into a large number of small files before processing. You can use the newer version of the split command with the option --filter =COMMANDProcesses directly on the original file and writes the processing results directly to the file combine.txt.
This saves the process of splitting and merging. 🎜
You can try using the paste command to merge a large number of files:
paste -d 'n' -s packages/*.txt > combine.txt
paste -d 'n' -s packages/*.txt > combine.txt
其实,原始文件切分并处理在一些情况下并不需要真正切分成大量的小文件之后才处理,可以利用较新版本的
In fact, in some cases, the original file does not need to be actually divided into a large number of small files before processing. You can use the newer version of thesplit
命令配合选项--filter=COMMAND
split
command with the option--filter =COMMAND
Processes directly on the original file and writes the processing results directly to the file combine.txt.Your idea of solving the problem must be wrong. I have never seen a document need to be divided into hundreds of thousands of parts.