#!/bin/sh (echo "stats items" ; echo "quit") | nc 127.0.0.1 11211 \ | grep '^STAT items' | awk -F: '{print $2}' | sort -u \ | (while read slab_id ; do echo "stats cachedump $slab_id 1000000000" ; done ; echo "quit") | nc 127.0.0.1 11211 \ | grep ^ITEM | awk '{print $2}' | grep ^greylist: \ | (while read KEY ; do echo "get $KEY" ; done ; echo "quit") | nc 127.0.0.1 11211 \ | grep -v '^END.$' | perl -p -e 's|\r\n$|\n|;s|^VALUE (.*?) \d+ \d+\n|$1\t|'