Skip to content

Instantly share code, notes, and snippets.

@antbbn
Created April 26, 2015 09:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save antbbn/c270383330ef9dde68c9 to your computer and use it in GitHub Desktop.
Save antbbn/c270383330ef9dde68c9 to your computer and use it in GitHub Desktop.
My try in bash abusing cut(1) with grouping by time:
for i in $(curl whatever | cut -sd "," -f 1,5,6 | grep -v null | head )
do
NAME=$(echo $i | cut -d '"' -f 4)
TIME=$(echo $i | cut -d '"' -f 8 | cut -d ' ' -f 1 | tr -d '-')
CC=$(echo $i | cut -d '"' -f 12)
echo $NAME,$CC > $TIME.csv
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment