Skip to content

Instantly share code, notes, and snippets.

@pwenzel
Created January 25, 2018 17:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pwenzel/ab347cee9a477adfb374e47c5430be2a to your computer and use it in GitHub Desktop.
Save pwenzel/ab347cee9a477adfb374e47c5430be2a to your computer and use it in GitHub Desktop.
Concatenate CSV files with sed
# Concatenate CSV files to all.csv in parent directory
# Assumes they all have the same CSV header
# https://stackoverflow.com/questions/9633114/unix-script-to-remove-the-first-line-of-a-csv-file/9633203#9633203
sed 1q *.csv > ../all.csv
sed 1d *.csv >> ../all.csv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment