I like to get the members of a set, NUL
-separated. What do I do?
redis-cli SMEMBERS theset
Uses the newline delimiter.
I am using python
as a workaround:
#!/usr/bin/env python3
import sys
import redis
r = redis.StrictRedis(host='localhost', port=6379, db=0)
first = True
for mem in r.smembers(sys.argv[1]):
if not first:
sys.stdout.buffer.write(b"\0")
sys.stdout.buffer.write(mem)
first = False