Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local args = {...}
- if #args == 0 then
- error("usage: which <program>", 0)
- end
- local result = shell.resolveProgram(args[1])
- if result == nil then
- error(table.concat {
- '"',
- args[1],
- '" not found'
- }, 0)
- end
- write '/'
- print(result)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement