Redis – GET data to SET

A simple easy command in order to sift through all keys stored in a Redis instance:

echo ‘KEYS *’|redis-cli|cut -d’)’ -f1|head -n -1|awk ‘{print “GET “$1}’

Use this command in conjuction with “grep” to manipulate a set of KVs in Redis on the fly.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s