ComputerCraft Archive

cat

computer utility chibbi github

Description

cat from chibbi/ComputerCraftScripts

Installation

Copy one of these commands into your ComputerCraft terminal:

wget:wget https://raw.githubusercontent.com/chibbi/ComputerCraftScripts/main/cat.lua cat
Archive:wget https://cc.shobie.xyz/cc/get/gh-chibbi-ComputerCraftScripts-cat cat
Quick Install: wget https://cc.shobie.xyz/cc/get/gh-chibbi-ComputerCraftScripts-cat cat

Usage

Run: cat

Tags

none

Source

View Original Source

Code Preview

local tArgs = {...}
local sPath = shell.resolve(tArgs[1])
if #tArgs == 0 then
	print("Usage: cat <path>")
	return
end
local file = fs.open(sPath, "r")
textutils.pagedPrint( file.readAll() )