Skip to content

Instantly share code, notes, and snippets.

@stelf
Created August 30, 2019 14:26
Show Gist options
  • Select an option

  • Save stelf/1c6f7327dcfbd644135b05dd5b970b00 to your computer and use it in GitHub Desktop.

Select an option

Save stelf/1c6f7327dcfbd644135b05dd5b970b00 to your computer and use it in GitHub Desktop.
IFS bash change example
IFS=$'\n'
dest=FL_insurance_sample.csv
counties=$(cut -d',' -f 3 $dest | sort | uniq)
for county in $counties
do
cnt=$(grep $county $dest | wc -l)
echo $county has $cnt
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment