单行脚本:
host=10.10.10.10;port=11211;echo -e "stats cachedump 2 0\r\nquit\r\n" | nc $host $port | awk ‘{print $2;}’| while read key;do echo get $key; done | nc $host $port
DevOps
单行脚本:
host=10.10.10.10;port=11211;echo -e "stats cachedump 2 0\r\nquit\r\n" | nc $host $port | awk ‘{print $2;}’| while read key;do echo get $key; done | nc $host $port