Skip to content

Instantly share code, notes, and snippets.

@rasoliveira
Created June 29, 2011 17:30
Show Gist options
  • Save rasoliveira/1054371 to your computer and use it in GitHub Desktop.
Save rasoliveira/1054371 to your computer and use it in GitHub Desktop.
Script simples para anunciar mudanças no rastreio dos Correios
RASTREIO="<CODIGO DE RASTREIO AQUI>"
ENDERECO="http://websro.correios.com.br/sro_bin/txect01$.QueryList?P_LINGUA=001&P_TIPO=001&P_COD_UNI=${RASTREIO}"
MUSICA="<MUSICA PARA TOCAR AQUI>"
wget $ENDERECO -O a
while true; do
wget $ENDERECO -O b
diff a b -q
if [ $? -ne 0 ] ; then
mplayer "$MUSICA"
break
fi
sleep 10
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment