Terminal command to parse through Twilio logs
# output: https://docs.google.com/spreadsheets/d/1J1IBGOkWFFcDFBo-_y5Ob8OmooFTxo8EPxADd1I605w/edit#gid=600400204
cat "10-October (RAW)-Table 1.csv" |\
grep -v -e '4253085228' -e '4258792714' -e '4252991052' -e '4253879383' -e '5099538760' -e '2062407766' -e '4258792774' -e '4252311781' -e '4252607320' -e '3603183999' | #exclude roadside phone numbers \
awk -F'thanks for choosing ' '{print $2}' | #grab everything after \
awk -F'. Leave us' '{print $1}' | #everything before \
sort -n | #sort \
grep -v "^[[:space:]]*$" | #remove empty lines \
uniq -c | #combine similar lines into one counted entry \
sort -r | #reverse sort \
#convert space between count and string to a tab \
awk '{match($0, /^ *[^ ]* /); printf("%s\t%s\n", $1, substr($0, RLENGTH + 1)); }'