Created
June 27, 2011 13:58
-
-
Save eduardodaluz/1048901 to your computer and use it in GitHub Desktop.
Pega ip através de script em bash
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Script para descobrir seu ip na internet. | |
# wget acessa o whatismyip.com que retorna o seu endereço na internet | |
# -q faz esse trabalho em modo silencioso, omitindo mensagens de alertas | |
# -O salva o resultado em /tmp/ipatual | |
wget http://automation.whatismyip.com/n09230945.asp -q -O /tmp/ipatual | |
# Emite a saida do arquivo /tmp/ipatual que contém o seu endereço na internet. | |
cat /tmp/ipatual | |
#Faz a quebra de linha. | |
echo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment