I have a lua-script, named "program.lua". I start this script as 'lua /path/to/program.lua' and I get specific CLI provided by the script:
bash $ /usr/bin/lua /path/to/program.lua
Usage:
help - help
quit - quit
do_get - get data
script> _
In this script I have function 'do_get', and if I call this function from the program.lua's CLI, I've got the correct output:
bash $ /usr/bin/lua /path/to/program.lua
Usage:
help - help
quit - quit
do_get - get data
script> do_get
string1
string2
param1
param2
script> _
The question. How I can call function 'do_get' from bash and get the output I need without entering to script's CLI?
The script edit is disallowed.
Thank you