In redis-cli, what is the command to print all the values in a list without knowing in advance the size of the list? I see lrange, but it requires naming the start index and the end index.
Sign up to request clarification or add additional context in comments.
Comments
0
Here's how I did it with python:
import redis r_server = redis.Redis() for num in "one", "two", "three", "four", "five": r_server.rpush("nums", num) length = r_server.llen("nums") for x in range(0,length): print(str(r_server.lindex("nums",x))) b'one' b'two' b'three' b'four' b'five'
redis-cliredis-cliis a new tag ... is it really needed to differentiate betweenredisandredis-cli?