Skip to content

Instantly share code, notes, and snippets.

@lighth7015
Created November 23, 2019 03:42
Show Gist options
  • Save lighth7015/0d2f0e2e1f31e3e342187a6bb0abc928 to your computer and use it in GitHub Desktop.
Save lighth7015/0d2f0e2e1f31e3e342187a6bb0abc928 to your computer and use it in GitHub Desktop.
filter.sh
#!/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