Hi OCaml people!
I wrote a shell scripting library called Feather. I like idea of writing bash-like code quickly, later being able to intersperse OCaml to add more typeful components as needed. It’s kind of like Shexp but without the monadic interface and with Async support. (Feather_async)
There’s a tutorial and some examples in the link above but here’s a quick taste:
open Feather let lines = find "." ~name:"*.ml" |. tr "/" "\n" |. map_lines ~f:String.capitalize |. sort |. process "uniq" [ "-c" ] |. process "sort" [ "-n" ] |. tail 4 |> collect_lines in String.concat ~sep:", " lines |> print_endline
Let me know if you have any feedback! Hope it ends up being useful, entertaining, or both!