把xxx那个位置替换成ip地址和端口号
#!/bin/bash
host=xxx
port=xxx
echo $host: $port
redis-cli -h $host -p $port client list | awk '{print $2}'|
cut -d = -f 2| cut -d : -f 1 | sort | uniq -c | sort -rn |
awk '{"host " $2 | getline h; print $1 "\t" $2 "\t" h;}'| awk '{print $1 "\t" $2 "\t" $7}'