mirror of
https://github.com/chubin/cheat.sheets
synced 2024-11-11 01:10:31 +00:00
22 lines
597 B
Plaintext
22 lines
597 B
Plaintext
# lua
|
|
# A powerful, light-weight embeddable programming language.
|
|
|
|
# Start an interactive Lua shell:
|
|
lua
|
|
|
|
# Execute a Lua script:
|
|
lua script_name.lua --optional-argument
|
|
|
|
# Execute a Lua expression:
|
|
lua -e 'print( "Hello World" )'
|
|
|
|
# All options are handled in order, except -i. For instance, an invocation like
|
|
# first set a to 1, then print the value of a (1), and finally run the file script.lua
|
|
lua -e'a=1' -e 'print(a)' script.lua
|
|
|
|
# See also:
|
|
# Lua language cheat sheets at /lua/
|
|
# list of pages: /lua/:list
|
|
# learn lua: /lua/:learn
|
|
# search in pages: /lua/~keyword
|