Skip to content

Instantly share code, notes, and snippets.

@getafixx
Created June 15, 2018 14:17
Show Gist options
  • Save getafixx/bae0e0055ac5c089da556b35bf86c7de to your computer and use it in GitHub Desktop.
Save getafixx/bae0e0055ac5c089da556b35bf86c7de to your computer and use it in GitHub Desktop.
a handy oneliner to watch live soccer scores on a terminal (i didn't write this)
watch -de -n 60 "curl -s --header 'X-Auth-Token: $SOCCER_CLI_API_TOKEN' 'http://api.football-data.org/v1/competitions/467/fixtures' | jq -er '.fixtures[] | select(.status == \"IN_PLAY\") | [.homeTeamName, .awayTeamName, .result.goalsHomeTeam, .result.goalsAwayTeam] | @csv' | awk -F ',' '{print $1 \"\t\t\" $3 \" vs \" $4 \"\t\t\" $2}'"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment