Skip to content

Instantly share code, notes, and snippets.

View maxbeutel's full-sized avatar

Max maxbeutel

View GitHub Profile
@maxbeutel
maxbeutel / memcache_grep
Created March 21, 2016 02:38 — forked from kganser/memcache_grep
Grep for a key in memcache
#!/bin/bash
host=$1
port=${PORT:-11211}
grepfor=$2
echo -e "stats items\nquit" | nc $host $port | cut -d: -f2 | sort -n | uniq | grep -v END | while read i; do echo -e "stats cachedump $i 100000\nquit" | nc $host $port | grep $grepfor; done