Hostname: Difference between revisions
Content added Content deleted
m (→{{header|Matlab}}: Case, whitespace) |
(→{{header|OCaml}}: ++ GNU Octave) |
||
Line 152: | Line 152: | ||
=={{header|OCaml}}== |
=={{header|OCaml}}== |
||
<lang ocaml>Unix.gethostname()</lang> |
<lang ocaml>Unix.gethostname()</lang> |
||
=={{header|Octave}}== |
|||
Similarly to [[Discover the Hostname#MATLAB|MATLAB]], we could call system command <tt>hostname</tt> to know the hostname. But we can also call the internal function <tt>uname()</tt> which returns a structure holding several informations, among these the hostname (nodename): |
|||
<lang octave> |
|||
uname().nodename |
|||
</lang> |
|||
=={{header|Perl}}== |
=={{header|Perl}}== |