1 #!/usr
/bin
/env
-S pm3
-l
4 A sampe script file on how to implement at cmd line interface.
5 It also demonstrates how the script can be used with a shebang.
8 print("This is how a cmd-line interface could be implemented\nPrint 'exit' to exit.\n")
14 if answer
~= 'exit' then
15 local func
= assert(loadstring("return " .. answer
))
16 io
.write("\n"..tostring(func() or "").."\n");
18 until answer
== "exit"