computercraft/packages/dig.lua

13 lines
213 B
Lua
Raw Permalink Normal View History

2023-10-08 10:04:21 +02:00
local args = { ... }
if args[1] == nil then
print("Usage: dig <hostname>")
return
end
2023-10-08 10:19:52 +02:00
result = lns.lookup(args[1])
if result == nil then
io.write("Not found!\n")
else
io.write(result .. "\n")
end