Advertisement
LightProgrammer000

Monitorando IP's

Nov 19th, 2021
1,402
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.29 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. Rede()
  4. {
  5.     ipLocal=$(hostname -I | awk {'print $1'})
  6.     ipExternal=$(curl --silent  ifconfig.me)
  7. }
  8.  
  9. clear
  10. while ((1))
  11. do
  12.     Rede
  13.     echo -e "\033[01;31m # IP Local: $ipLocal      \033[01;37m"
  14.     echo -e "\033[01;32m # IP Externo: $ipExternal \033[01;37m"
  15.     echo ""
  16.     sleep 3
  17. done
  18.  
  19.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement