turtle5204

ocappend

Jan 1st, 2016
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. --ocappeand
  2. local shell = require 'shell'
  3. local f = require 'filesystem'
  4. local o,a = shell.parse(...)
  5.  
  6. if #o < 2 then
  7. error("programName [fileA] [fileB]", 0)
  8. end
  9.  
  10. local fa = f.open(o[2], 'r' )
  11. local data = fa.read()
  12. fa.close()
  13.  
  14. local fb = f.open( o[1], 'a' )
  15. fb.write("\n ")
  16. fb.write(data)
  17. fb.close()
Advertisement
Add Comment
Please, Sign In to add comment