Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.loadAPI('fs')
- local dev = false
- local tArgs = { ... } --args
- if #tArgs == 0 then --args
- print('Usage: lsc <path>') --Print Usage
- else
- local path = tArgs[1] --path
- local x = fs.open(path,'r') --attempted fs access
- local loop = true --loop
- while loop do --loop begin
- local commands = {} --empties commands
- local line = x.readLine()
- if line then --if the line has things
- text = nil --nillifies text
- for text in string.gmatch(line,"%w+") do
- table.insert(commands,text)end
- shell.run(string.format(line))
- else --else loop
- loop = false --ends loop
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement