shell tools: globbing

This commit is contained in:
kepler155c@gmail.com
2019-05-10 08:08:49 -04:00
parent 8ea2598254
commit 86cba3b585
35 changed files with 303 additions and 432 deletions

17
shellex/hostname.lua Normal file
View File

@@ -0,0 +1,17 @@
local os = _G.os
local shell = require("shellex.shell")
local args = shell.parse(...)
local hostname = args[1]
if hostname then
os.setComputerLabel(hostname)
else
hostname = os.getComputerLabel()
if hostname then
print(hostname)
else
io.stderr:write("Hostname not set\n")
return 1
end
end