Skip to content

Instantly share code, notes, and snippets.

@mmohiudd
Created February 10, 2015 17:33
Show Gist options
  • Save mmohiudd/1c04702b965d309c2027 to your computer and use it in GitHub Desktop.
Save mmohiudd/1c04702b965d309c2027 to your computer and use it in GitHub Desktop.
redis mass insertion
The text file data.txt contains the following
ZADD myzset 1 a
ZADD myzset 1 b
ZADD myzset 1 c
Run this command to read from data file and insert to redis:
cat data.txt|xargs -n 4 redis-cli
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment