blob: be5e7fc30a38f0772944cca11f4b44412188ad91 [file] [log] [blame] [raw]
local args = {...}
if #args < 1 then
for k,v in pairs(os.getenv()) do
io.write(k..'='..v..'\n')
end
else
local count = 1
for _, expr in ipairs(args) do
local k, v = string.match(expr, "(.-)=(.*)")
if v then
os.setenv(k, v)
else
os.setenv(tostring(count), k)
count = count + 1
end
end
end