lua-helloworld

write script file, a.lua:

#!/usr/bin/lua

print("hello world!")

add excutable prperty to this file:

chmod a+x a.lua

now, we can run this file as program:

./a.lua

of couse, also, i can run lik this "lua ./a.lua", and we dont need the first line in a.lua file.

running show:

done.

原文地址:https://www.cnblogs.com/liyou-blog/p/10203498.html