Skip to content

Instantly share code, notes, and snippets.

@kalpesh-fulpagare
Last active December 27, 2018 07:27
Show Gist options
  • Save kalpesh-fulpagare/507d5ab61e0e27fc654a2d9a3dce4efd to your computer and use it in GitHub Desktop.
Save kalpesh-fulpagare/507d5ab61e0e27fc654a2d9a3dce4efd to your computer and use it in GitHub Desktop.
Join Multiple Files from Linux Command Line
echo 'file-chunk'{1..19}'.ts' | tr " " "\n" > file_listing
cat file_listing
touch combined_test_file.ts
while read line; do cat $line >> combined_test_file.ts; done < file_listing
while read line; do rm -f $line; done < file_listing
rm -f file_listing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment