TangentFox

cat v1.1.0

Aug 24th, 2019 (edited)
326
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.25 KB | None | 0 0
  1. local function cat(path)
  2.   local file = fs.open(shell.resolve(path), "r")
  3.   local line = file.readLine()
  4.   while line do
  5.     print(line)
  6.     line = file.readLine()
  7.   end
  8.   file.close()
  9. end
  10.  
  11. for i = 1, select("#", ...) do
  12.   cat(select(i, ...))
  13. end
Add Comment
Please, Sign In to add comment