Run an External Command and Process Stdout using feather
Task
Operating System / Run an External Command and Process Stdout
Opam Packages Used
- feather Tested with version: 0.3.0 — Used libraries: feather
Code
Feather.process
executes a program and Feather.collect
returns a single string containing the whole standard output.
let () =
let ps_output =
Feather.(process "ps" ["-x"]
|> collect stdout)
in
print_endline ps_output