Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local args = {...}
- local function printUsage()
- print("Usage: wget <URL> <Output Name>")
- end
- if #args < 2 then
- printUsage()
- else
- local file = fs.open(args[2],"w")
- local receive = http.get(args[1])
- print("Received Data")
- file.write(receive.readAll())
- print("Writing Data")
- file.close()
- receive.close()
- os.queueEvent("ProgClose")
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement