OctOS: Add echo command

Prints text to the command line.
master
octacian 2017-03-28 16:26:26 -07:00
parent 9ec3d9e76f
commit 3c2fa52b4f
3 changed files with 10 additions and 2 deletions

View File

@ -2,9 +2,10 @@
OctOS is the operating system used by digicomputers. OctOS is made of many Linux-like commands which are documented under the Commands section, however, there is also an API which can be used when writing programs for OctOS which is documented in `os_api.md`. Available commands are documented below.
#### `help [command, "all"]`
Shows help about the command specified or all commands if `all` is specified.
#### `lua [code]`
Runs Lua code from the command line under the secure environment.
Runs Lua code from the command line under the secure environment.
#### `echo [text]`
Print text to the command line.

3
octos/bin/echo Normal file
View File

@ -0,0 +1,3 @@
name = echo
description = Print text to the command line
exec = os/exec/echo.lua

4
octos/exec/echo.lua Normal file
View File

@ -0,0 +1,4 @@
local params = ...
local text = (table.concat(params, " "))
print(text)