Skip to content

Instantly share code, notes, and snippets.

@guilsa
Last active October 3, 2022 00:14
Show Gist options
  • Save guilsa/61f6b1e3c1e2742f6d2ccc686d31b666 to your computer and use it in GitHub Desktop.
Save guilsa/61f6b1e3c1e2742f6d2ccc686d31b666 to your computer and use it in GitHub Desktop.
Eleição Brasil - Primeiro Turno 2022
#!/bin/bash
while true
do
lula=$(curl -s https://resultados.tse.jus.br/oficial/ele2022/544/dados-simplificados/br/br-c0001-e000544-r.json | jq '.cand[] | select(.nm == "LULA").vap | tonumber' 2> /dev/null )
bozo=$(curl -s https://resultados.tse.jus.br/oficial/ele2022/544/dados-simplificados/br/br-c0001-e000544-r.json | jq '.cand[] | select(.nm == "JAIR BOLSONARO").vap | tonumber' 2> /dev/null )
echo $(( $lula - $bozo ))
sleep 30
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment