redis-cli set command

86 views
Skip to first unread message

Kaan Çalışkan

unread,
May 4, 2012, 4:46:06 AM5/4/12
to redi...@googlegroups.com
Hi All,

I try to set key value via set command of redis-cli. When i use "./redis-cli -h ip1 -p port set 119 "Wed Jan 25 05:27:01 EET 2012"" it is working fine. But when i use it in shell script, i have an error message "ERR wrong number of arguments for 'set' command".

Script is like that;

 ./redis-cli -h 172.20.167.201 -p 6379 set $a $b

I used echo command to control a and b variables and they are all true.

Best regards.

Salvatore Sanfilippo

unread,
May 4, 2012, 4:48:27 AM5/4/12
to redi...@googlegroups.com
On Fri, May 4, 2012 at 10:46 AM, Kaan Çalışkan <calis...@gmail.com> wrote:

Hello

>  ./redis-cli -h 172.20.167.201 -p 6379 set $a $b

Try with:

./redis-cli -h 172.20.167.201 -p 6379 set "$a" "$b"

Salvatore

--
Salvatore 'antirez' Sanfilippo
open source developer - VMware

http://invece.org
"We are what we repeatedly do. Excellence, therefore, is not an act,
but a habit." -- Aristotele

Kaan Çalışkan

unread,
May 4, 2012, 5:04:16 AM5/4/12
to redi...@googlegroups.com
Thank you so much. It is ok. 


2012/5/4 Salvatore Sanfilippo <ant...@gmail.com>
--
You received this message because you are subscribed to the Google Groups "Redis DB" group.
To post to this group, send email to redi...@googlegroups.com.
To unsubscribe from this group, send email to redis-db+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/redis-db?hl=en.


Reply all
Reply to author
Forward
0 new messages