Skip to content

Instantly share code, notes, and snippets.

@shawnkendrick
Last active March 8, 2023 17:52
Show Gist options
  • Save shawnkendrick/a80b5d9231461003fb06f96f433a3305 to your computer and use it in GitHub Desktop.
Save shawnkendrick/a80b5d9231461003fb06f96f433a3305 to your computer and use it in GitHub Desktop.
commonly used but often forgotten
# combine, sort and combine all files in a directory into single file
cat dir/*.csv | sort -u > output.csv
# add character to front of every of every line in a file
sed 's/^/#/' file.txt
# combine multiple CSVs, exclude all but first header
awk 'FNR==1 && NR!=1{next;}{print}' *.csv > combined.csv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment