Advertisement
xeritt

Pastebin run

Aug 25th, 2018
237
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.34 KB | None
  1. local arg = {...}
  2. local runStr = "pastebin run "
  3. if (arg[1]==nil) then
  4.     print("Нет входных параметров!")
  5. else
  6.     if (arg[2]==nil) then
  7.         runStr = runStr..arg[1]
  8.     else
  9.         runStr = runStr..arg[1]..' '..arg[2]
  10.     end
  11.     local success, reason = shell.execute(runStr)
  12.     if not success then
  13.         print(reason)
  14.     end
  15.     print (success)
  16. end
Advertisement
RAW Paste Data Copied
Advertisement