shell-script-pt
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [shell-script] Script com netstat


From: Davidson Paulo
Subject: Re: [shell-script] Script com netstat
Date: Thu, 5 Jul 2012 15:55:38 -0300

Em 5 de julho de 2012 14:35, sh3ll script <address@hidden> escreveu:
> echo -e ' Qtd IP\n === ==' | cat - <(netstat -antu | awk '{print
> $8}' | grep -i ESTABLISHED | grep -E '([0-9]{1,3}\.){3}[0-9]{1,3}' | sort |
> uniq -c)

Alternativa:

$ echo -e "    Qtd IP\n    === ==" ; netstat -antu | awk '$6 ==
"ESTABELECIDA" { print $5 }' | cut -d: -f1 | sort | uniq -c
    Qtd IP
    === ==
      1 10.11.56.29
      1 199.47.219.151
      2 209.85.225.125
      1 74.125.225.117
      1 74.125.225.34
      1 74.125.225.70

Um abraço,

--
Davidson Paulo, Especialista Linux
http://davidsonpaulo.com


reply via email to

[Prev in Thread] Current Thread [Next in Thread]