hiddenid01 / redis

Automatically exported from code.google.com/p/redis
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Stdin and redis cli #446

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
redis-cli should allow:

cat file | redis-cli set file

This could allow fast-file loads without necessarily loading the whole file 
into RAM at once.

Original issue reported on code.google.com by jamiesonbecker@gmail.com on 31 Jan 2011 at 1:06

GoogleCodeExporter commented 9 years ago
Should be a feature request, don't see any option to modify

Original comment by jamiesonbecker@gmail.com on 31 Jan 2011 at 1:07

GoogleCodeExporter commented 9 years ago
If you check the help for redis-cli (redis-cli --help), you'll see that the -x 
flag makes it read the last argument from STDIN.

Original comment by pcnoordh...@gmail.com on 31 Jan 2011 at 8:32

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
This is very helpful, thank you!

Unfortunately, I do not see that at all. In fact, there's almost no 
documentation on redis-cli in v2.0.4-stable.

$ ./redis-cli -v
redis-cli shipped with Redis verison 2.0.0

$ man redis-cli
No manual entry for redis-cli
See 'man 7 undocumented' for help when manual pages are not available.

$ ./redis-cli --help
(error) ERR unknown command '--help'

$ ./redis-cli -h
usage: redis-cli [-iv] [-h host] [-p port] [-a authpw] [-r repeat_times] [-n 
db_num] cmd arg1 arg2 arg3 ... argN
usage: echo "argN" | redis-cli -x [options] cmd arg1 arg2 ... arg(N-1)

example: cat /etc/passwd | redis-cli -x set my_passwd
example: redis-cli get my_passwd
example: redis-cli -r 100 lpush mylist x

Run in interactive mode: redis-cli -i or just don't pass any command

But... what you said worked! thanks!!

Original comment by jamiesonbecker@gmail.com on 31 Jan 2011 at 8:13