Created
August 30, 2019 14:26
-
-
Save stelf/1c6f7327dcfbd644135b05dd5b970b00 to your computer and use it in GitHub Desktop.
IFS bash change example
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
| 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