Voici la sortie de ma commande netstat. Je veux compter le total du premier numéro de champ comme 7+8+1+1+1+1+3+1+2..so on...
Comment puis-je utiliser bc
ou toute autre commande de méthode pour les compter au total?Nombre total de commandes Linux bc
[[email protected] httpd]# netstat -natp | grep 7143 | grep EST | awk -F' ' '{print $5}' | awk -F: '{print $1}' | sort -nr | uniq -c
7 209.139.35.xxx
8 209.139.35.xxx
1 209.139.35.xxx
1 209.139.35.xxx
1 208.46.149.xxx
3 96.17.177.xxx
1 96.17.177.xxx
2 96.17.177.xxx
vous avez probablement une meilleure chance d'obtenir une réponse sur http://unix.stackexchange.com/ –