Unix/bash: Reading A List of Files and Merge Them To A File Unix/bash: Reading A List of Files and Merge Them To A File unix unix

Unix/bash: Reading A List of Files and Merge Them To A File


xargs < list.text cat > final_file.txt

xargs will send the file names from list.text to cat, in batches (so they won't overflow the command line). Then cat will print the contents of each file, with the output redirected to final_file.text.