Last active
March 8, 2023 17:52
-
-
Save shawnkendrick/a80b5d9231461003fb06f96f433a3305 to your computer and use it in GitHub Desktop.
commonly used but often forgotten
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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