Hostname: Difference between revisions

Added FreeBASIC
(Lingo added)
(Added FreeBASIC)
Line 230:
end program test_hostname
</lang>
 
=={{header|FreeBASIC}}==
<lang freebasic>' FB 1.05.0 Win64
 
' On Windows 10, the command line utility HOSTNAME.EXE prints the 'hostname' to the console.
' We can execute this remotely and read from its 'stdin' stream as follows:
 
Dim As String hostname
Open Pipe "hostname" For Input As #1
Input #1, hostname
Close #1
Print hostname
Print
Print "Press any key to quit"
Sleep</lang>
 
=={{header|Go}}==
9,476

edits