Skip to content

Instantly share code, notes, and snippets.

View plantarum's full-sized avatar

Tyler Smith plantarum

View GitHub Profile
@plantarum
plantarum / grep.sh
Created February 27, 2017 22:15
loop over regexes to exclude them from a file
## make a copy of the original file that we can modify
cp original_data outfile
## loop over a file of regexs, applying each to our output
while read rx; do
grep -v $rx outfile > outfile.tmp
mv outfile.tmp outfile
done < regex_file