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.

posted @ 2018-12-31 22:35  liyou  阅读(345)  评论(0编辑  收藏  举报