Cotáção do Dólar
Publicado por George Kihoma 19/06/2008
[ Hits: 7.437 ]
Aqui no trabalho às vezes preciso saber da cotação corrente do dólar.
Hoje fica fácil abrir um browser e visualizar a informação, mas muitas vezes as páginas exibem os valores em meio a muitas outras informações, tornando a navegação um tanto quanto dispersiva.
Consulta da cotação do dólar Aqui no trabalho às vezes preciso saber da cotação corrente do dólar. Hoje fica fácil abrir um browser e visualizar a informação, mas muitas vezes as páginas exibem os valores em meio a muitas outars informações, tornando a navegação um tanto quanto dispersiva. Por isso fiz o script abaixo, que usa ferramentas *nix portadas para Windows. O script: 1 - Faz o download do arquivo index.html em http://www1.folha.uol.com.br/folha/dinheiro/ 2 - Processa o arquivo em busca da sinformações desejadas 3 - Exibe as informações em uma Message Box Para funcionar, é necessário que o script rode na mesma pasta onde se encontram os binários do wget, cat, cut, grep e printf portados para Windows, além da dll cygwin.dll exigida pelos executáveis. Você poderá obter esses binários em http://unxutils.sourceforge.net/ echo off cls color 0A printf \n\n printf "*****************************************************************************" printf \t\t\t\t" COTACAO DO DOLAR" printf \n printf "*****************************************************************************" printf \n del dolar.txt del index.html* del wget-log* printf "*****************************************************************************" printf \t\t\t\t"CONSULTANDO DADOS NA WEB" printf \n printf "*****************************************************************************" printf \n\n\n wget -q -b http://www1.folha.uol.com.br/folha/dinheiro/ printf \n\n\n cls printf "*****************************************************************************">>DOLAR.TXT printf \n\n>>DOLAR.TXT printf \t\t" VALORES DO DOLAR EM %DATE% AS %TIME%">>DOLAR.TXT printf \n\n>>DOLAR.TXT printf "*****************************************************************************">>DOLAR.TXT printf \n\n\n>>DOLAR.TXT echo off printf \n\t\t >>DOLAR.TXT printf "Dolar comercial = " >>DOLAR.TXT printf \t >>DOLAR.TXT grep "D.lar comercial" index.html|cut -d ">" -f7|cut -d "<" -f1>>DOLAR.TXT printf \n\t\t >>DOLAR.TXT printf "Dolar paralelo = ">>DOLAR.TXT printf \t >>DOLAR.TXT grep "D.lar paralelo" index.html|cut -d ">" -f7|cut -d "<" -f1>>DOLAR.TXT printf \n\t\t >>DOLAR.TXT printf "Dolar turismo = " >>DOLAR.TXT printf \t >>DOLAR.TXT grep "D.lar turismo" index.html|cut -d ">" -f7|cut -d "<" -f1>>DOLAR.TXT printf \n\t\t >>DOLAR.TXT printf "EURO = ">>DOLAR.TXT printf \t>>DOLAR.TXT grep "Euro" index.html|cut -d ">" -f7|cut -d "<" -f1>>DOLAR.TXT printf \n\t\t>>DOLAR.TXT printf \n\n\n\n>>DOLAR.TXT printf \t\t"*****************************************">>DOLAR.TXT printf \n>>DOLAR.TXT printf \t\t"* *">>DOLAR.TXT printf \n>>DOLAR.TXT printf \t\t"* Fonte: Folha On-Line *">>DOLAR.TXT printf \n>>DOLAR.TXT printf \t\t"* *">>DOLAR.TXT printf \n>>DOLAR.TXT printf \t\t"*****************************************">>DOLAR.TXT printf \n\n\n>>dolar.txt type dolar.txt|MSG %username% rem pause color exit
Conexão e desconexão ADSL automáticas
bloqueando TODAS as PORTAS do EMULE
Convertendo man pages em arquivos pdf
Instalar e Configurar o Slackware Linux em 2025
Como configurar os repositórios do apt no Debian 12 em 2025
Passkeys: A Evolução da Autenticação Digital
Instalação de distro Linux em computadores, netbooks, etc, em rede com o Clonezilla
Como colorir os logs do terminal com ccze
Instalação Microsoft Edge no Linux Mint 22
Como configurar posicionamento e movimento de janelas no Lubuntu (Openbox) com atalhos de teclado
Máquinas Virtuais com IP estático acessando Internet no Virtualbox
Criar entrada no GRUB para uma ISO Linux (7)
Open Suse não abre wi-fi automaticamente (3)
Ruído no Microfone (ALC287 - AMD Ryzen 5 7535HS) no Debian 12.9 (15)