Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save cerdman/8d31d1236b88de52b19a821e8398dda8 to your computer and use it in GitHub Desktop.
Save cerdman/8d31d1236b88de52b19a821e8398dda8 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