使用 feather 執行管道外部命令

任務

作業系統 / 執行管道外部命令

使用的 Opam 套件

  • feather 測試版本:0.3.0 — 使用的函式庫:feather

程式碼

Feather 模組的 |. 運算子可用於管道傳輸不同的命令。

let () =
  let sort_output =
    Feather.(echo "t\nz\nu\na\nb" |. process "sort" [""] |> collect stdout)
  in
  print_string sort_output

食譜無法運作?註解不清楚或已過時?

開啟議題貢獻此食譜

此任務的其他食譜