-- Purely for functions which do not return anything.

local function UnixClear()
	os.execute("clear")
end

local function Echo(inval)
	os.execute('echo -n \''..tostring(inval).. '\'')
end

local function IoWrite(instr)
	io.write(instr) io.flush()
end

-- Writes or appends a string to a file.
local function WriteToFile(what,where,replace)
	if where == nil then where = "output" end
		local wherefile = io.open(where,"r")
		if wherefile == nil or replace == true then
			if wherefile ~= nil then wherefile:close() end
			wherefile = io.open(where,"w")
		else
			wherefile:close()
			wherefile = io.open(where,"a")
		end
		if wherefile ~= nil then
			wherefile:write(tostring(what))
			wherefile:close()
		else
			print("Failed to write to " .. tostring(where))
		end
end

