RosettaCodeData/Task/Hostname/Lingo/hostname.lingo

7 lines
207 B
Text
Raw Permalink Normal View History

2016-12-05 23:44:36 +01:00
sx = xtra("Shell").new()
if the platform contains "win" then
hostname = sx.shell_cmd("hostname", ["eol":RETURN]).line[1] -- win 7 or later
else
hostname = sx.shell_cmd("hostname", RETURN).line[1]
end if