In a Lua script, i am making some redis calls and also want to write some text data to a file as well.
But when I am executing this lua script from redis using '--eval', it is not able to recognize 'io' or 'require' libraries and hence not able to execute.
Please if you can tell me if there is a way that i can write data to a file in lua when i am calling lua script from redis.
Note : command that i am executing : ' /opt/redis/src/redis-cli -p 6379 --eval test.lua '
in test.lua, it fails in line : " file = io.open("output.txt", "a") "
it shows me the error message : Script attempted to access unexisting global variable 'io'