$ mem(){ { case $1 in stats|delete) printf “%s %s %s %s %s” “$1″ “$2″ “$3″ “$4″ “$5″;; *) local a=$3;dd if=$3 2>&1|sed ‘$!d;/^0/d;s/ .*//;s/^/’”$1″‘ ‘”$2″‘ 1 0 /; r ‘”$a”” 2>/dev/null;;esac;printf “\r\nquit\r\n”;}|nc -n 127.0.0.1 11211; }
usage: mem memcache-command [arguments]
where memcache-command might be:
set
add
get[s]
append
prepend
replace
delete
incr
decr
cas
stats
notes:
exptime argument is set to 0 (no expire)
flags argument is set to 1 (arbitrary)
View this command to comment, vote or add to favourites
View all commands by argv

by David Winterbottom (codeinthehole.com)






















0 Comments
You can be the first one to leave a comment.