Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jun 11th, 2012  |  syntax: None  |  size: 0.57 KB  |  hits: 13  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. #Adicione essas linhas no seu ~/.bashrc
  2.  
  3. netinfo ()
  4. {
  5.     echo “————— NetWork information-------”
  6.     /sbin/ifconfig | awk /'inet addr/ {print $2}'
  7.     /sbin/ifconfig | awk /'Bcast/ {print $3}'
  8.     /sbin/ifconfig | awk /'inet addr/ {print $4}'
  9.     /sbin/ifconfig | awk /'HWaddr/ {print $4,$5}'
  10.     myip=`lynx -dump -hiddenlinks=ignore -nolist http://checkip.dyndns.org:8245/ | sed '/^$/d; s/^[ ]*//g; s/[ ]*$//g' `
  11.     echo
  12.     echo “${myip}”
  13.     echo ""
  14.  
  15. }
  16.  
  17.  
  18. #e depois rode
  19. soure ~/.bashrc
  20.  
  21. #agora chame a função netinfo();
  22.  
  23. netinfo