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

Recipe not working? Comments not clear or out of date?

Open an issue or contribute to this recipe!

Other Recipes for this Task