RosettaCodeData/Task/Host-introspection/OCaml/host-introspection-3.ml
2024-10-16 18:07:41 -07:00

8 lines
177 B
OCaml

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"