Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
using multipe keys and arguments with lua script via redis-cli
-- redis-cli --eval hello.lua Tester " devops" , Argument1 " argument2"
-- KEYS[1] == "Tester"
-- KEYS[2] == " devops"
-- ARGV[1] == "Argument1"
-- ARGV[2] == " argument2"
local msg = "Hello, world," .. KEYS[1] .. KEYS[2] .. "!" .. ARGV[1] .. ARGV[2]
return msg
$ redis-cli --eval hello.lua Tester " devops" , Argument1 " argument2"
"Hello, world,Tester devops!Argument1 argument2"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.