Created
November 23, 2019 03:42
-
-
Save lighth7015/0d2f0e2e1f31e3e342187a6bb0abc928 to your computer and use it in GitHub Desktop.
filter.sh
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/env sh | |
IFS=' '; | |
parse() { | |
while read -r line; do | |
list=${line} | |
for NDC in ${list[@]}; do | |
if [[ "list[${NDC}]" -gt 0 ]]; then | |
printf "ndc: %d\n" "$NDC" | |
fi | |
done | |
done <"$1" | |
} | |
parse "drug-ndcs.txt" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment