#!/bin/bash
#
#********************************************************************
#Author: QH
#QQ: 1625317303
#Date: 2019-03-16
#FileName: sysinfo.sh
#Mail: 1625317303@qq.com
#Description: The test script
#Copyright (C): 2019 All rights reserved
#********************************************************************
BEGIN="\e[1;35m"
END="\e[0m"
echo -e "${BEGIN}`netstat -tan | grep 'ESTAB' | tr -s ' ' ':' | cut -d: -f6 | sort | uniq -c | sort -nr`${END}"
转载于:https://blog.51cto.com/9019400/2364535