RosettaCodeData/Task/Host-introspection/OCaml/host-introspection-3.ocaml
2023-07-01 13:44:08 -04:00

8 lines
177 B
Text

let uname arg =
let arg = if arg = "" then "-" else arg in
let ic = Unix.open_process_in ("uname -" ^ arg) in
(input_line ic)
;;
# uname "sm";;
- : string = "Linux i686"