This file contains 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 |
This file contains 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
* recursive grep, exclude a directory | |
grep -R -l --exclude-dir=examples 'meh' . | |
* recursive grep, exclude mutliple directorie & files | |
grep -r --color --exclude-dir={custom,lib,scripts} --exclude={*.xml,error_log} "beta" . | |
* find | |
find . -name *.jpg | |
* port activity |