Last active
September 19, 2016 20:19
-
-
Save hempnall/e265b70b9c5c62a42799497734f406df to your computer and use it in GitHub Desktop.
Filtering using AWK
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
#!/usr/bin/awk -f | |
# $ ./filter.awk filter_list data_file | |
# http://stackoverflow.com/questions/14062402/awk-using-a-file-to-filter-another-one-out-tr | |
BEGIN { | |
FS=","; | |
} | |
FNR==NR { | |
a[$0]; | |
next | |
} | |
$0 in a { print } | |
END { | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment