Advertisement
joebodo

apps.which.lua

May 20th, 2014
947
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.26 KB | None | 0 0
  1. local args = { ... }
  2. if #args == 1 then
  3.   local fname = args[1]
  4.   local sPath = shell.resolveProgram(fname)
  5.   if sPath then
  6.     print(sPath)
  7.   else
  8.     printError('File not found in ' .. shell.path())
  9.   end
  10. else
  11.   printError('syntax: touch <filename>')
  12. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement