# Looking for "lovely, idiomatic" examples of Ocaml used for shell-scripting in the manner of Perl/Python (but esp. Perl)

**URL:** <https://discuss.ocaml.org/t/looking-for-lovely-idiomatic-examples-of-ocaml-used-for-shell-scripting-in-the-manner-of-perl-python-but-esp-perl/5703>\
**Category:** Ecosystem\
**Created:** [May 4, 2020, 10:06pm UTC](https://discuss.ocaml.org/t/looking-for-lovely-idiomatic-examples-of-ocaml-used-for-shell-scripting-in-the-manner-of-perl-python-but-esp-perl/5703 "2020-05-04T22:06:25Z")\
**Posts on this page:** 3\
**Page:** 2

<div class="post-metadata">

**Author:** ![donn](https://avatars.discourse-cdn.com/v4/letter/d/7ea924/32.png) [@donn](https://discuss.ocaml.org/u/donn)\
**Post date:** [May 9, 2020, 5:59pm UTC](https://discuss.ocaml.org/t/looking-for-lovely-idiomatic-examples-of-ocaml-used-for-shell-scripting-in-the-manner-of-perl-python-but-esp-perl/5703/21 "2020-05-09T17:59:57Z")

</div>

To the extent this is about shells, maybe some would be interested to look into “es”, which I think may be the closest anyone has come to a Functional Programming shell. It’s been decades since anyone worked on it, I suppose, but still works. Lexical scope, partial application, etc., with a usable syntax for interactive use and normal shell scripts (i.e., not like Lisp.)

---

<div class="post-metadata">

**Author:** ![dariusf](https://avatars.discourse-cdn.com/v4/letter/d/f07891/32.png) [@dariusf](https://discuss.ocaml.org/u/dariusf)\
**Post date:** [May 21, 2020, 5:12am UTC](https://discuss.ocaml.org/t/looking-for-lovely-idiomatic-examples-of-ocaml-used-for-shell-scripting-in-the-manner-of-perl-python-but-esp-perl/5703/22 "2020-05-21T05:12:48Z")

</div>

I really like this design. Been turning a similiar idea over in my head for a while, and this is a very nice realization of the concept. If you ever want to hack on something like this I’d be happy to contribute!

---

<div class="post-metadata">

**Author:** ![mjambon](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/mjambon/32/6180_2.png) [@mjambon](https://discuss.ocaml.org/u/mjambon)\
**Post date:** [June 3, 2020, 6:53pm UTC](https://discuss.ocaml.org/t/looking-for-lovely-idiomatic-examples-of-ocaml-used-for-shell-scripting-in-the-manner-of-perl-python-but-esp-perl/5703/23 "2020-06-03T18:53:36Z")

</div>

I’m unlikely to work on this anytime soon due to other priorities but I’d use the tool if it’s solid! I must say the bar is high. Perhaps making such a tool for a more mainstream language than OCaml would be more rewarding.

[Previous page](https://discuss.ocaml.org/t/looking-for-lovely-idiomatic-examples-of-ocaml-used-for-shell-scripting-in-the-manner-of-perl-python-but-esp-perl/5703.md?page=1)
