shell.run
From ComputerCraft Wiki
Function shell.run | |
Runs program with as many specified arguments as are provided. Essentially takes all parameters passed to it and runs them as one line - for eg, shell.run("monitor","top","alongtimeago") is the same as shell.run("monitor top alongtimeago"), and you can use whichever syntax happens to suit you. | |
Syntax | shell.run(string program [, string args1, string args2, ...]) |
Returns | boolean success |
Part of | ComputerCraft |
API | shell |
Examples
Example | |
Runs the program "myProgram" with arguments "test" and "ing": | |
Code |
shell.run("myProgram", "test", "ing") |
Output | The program myProgram with the arguments "test" and "ing". |
Example | |
Runs the program "monitor" along with the other arguments set in "myTable": | |
Code |
local myTable = {"monitor","left","worm"} shell.run( unpack(myTable) ) |