-
Notifications
You must be signed in to change notification settings - Fork 227
The shell
Jaume Olivé Petrus edited this page Jun 6, 2017
·
34 revisions
Lua RTOS has an integrated shell that allows you to execute certain commands in a linux similar way. The shell is disabled by default, but you can enable it typing os.shell(true) in the prompt or putting os.shell(true) in the system.lua file.
The following explains all the commands supported by the shell.
Print FILE on the standard output.
/ > cat system.lua
-- system.lua
--
-- This script is executed after a system boot or a system reset and is intended
-- for setup the system.
---------------------------------------------------
-- Main setups
---------------------------------------------------
os.loglevel(os.LOG_INFO) -- Log level to info
os.logcons(true) -- Enable/disable sys log messages to console
os.shell(true) -- Enable/disable shell
os.history(false) -- Enable/disable history
/ >
Change the working directory.
/ > cd examples
/examples >
Copy the SOURCE file to the DESTINATION file.
/ > cp autorun.lua autorun.old
/ >