Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- runShell.lua
- -- A simple program to run shell commands in ComputerCraft
- print("Enter the shell command:")
- local command = read() -- Reads input from the user
- local success, output = pcall(function()
- return shell.run(command)
- end)
- if success then
- print("Command executed successfully.")
- else
- print("Error executing command:")
- print(output)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement