Saturday, April 6, 2019

combining files


  1. list the files you want to concat
    ls | grep [pattern] > filelist
  2. Review your files are in the proper order with vi or cat. If you use a suffix (1, 2, 3, ..., N) this should be no problem
  3. Create the final file
    cat filelist | xargs cat >> [final file]
  4. Remove the filelist
    rm -f filelist
Hope this helps anyone

No comments:

Post a Comment