# \#script

**URL:** https://discuss.ocaml.org/tag/script/77.md

[Latest](https://discuss.ocaml.org/latest.md) · [Categories](https://discuss.ocaml.org/categories.md) · [Tags](https://discuss.ocaml.org/tags.md)

---

## [Using \`ocaml\` and \`ocamlfind\` to run scripts without #-directives](https://discuss.ocaml.org/t/using-ocaml-and-ocamlfind-to-run-scripts-without-directives/16354)

<div class="topic-metadata">

**Author:** [@arvidj](https://discuss.ocaml.org/u/arvidj)\
**Replies:** 1\
**Last updated:** [March 22, 2025, 9:59am UTC](https://discuss.ocaml.org/t/using-ocaml-and-ocamlfind-to-run-scripts-without-directives/16354 "2025-03-22T09:59:38Z")

</div>

I’d like to use the ocaml binary to run a script using 3rd-party libraries. I have OCaml 5.3.0. I’d like my script not to contain any “#”-directives, as these are not recognized by my editor. In particular, I’d like t…

---

## [Backtraces in script run by ocaml](https://discuss.ocaml.org/t/backtraces-in-script-run-by-ocaml/5970)

<div class="topic-metadata">

**Author:** [@Serpent7776](https://discuss.ocaml.org/u/Serpent7776)\
**Replies:** 7\
**Last updated:** [December 1, 2021, 1:19pm UTC](https://discuss.ocaml.org/t/backtraces-in-script-run-by-ocaml/5970 "2021-12-01T13:19:47Z")

</div>

How do I get proper backtraces when running script with ocaml? For example I have test.ml let f () = failwith "test" let proc () = f () let () = proc () When I run ocaml with env OCAMLRUNPARAM=b ocaml test.ml I get E…

---

## [Stop opam blurb about environment sync](https://discuss.ocaml.org/t/stop-opam-blurb-about-environment-sync/6649)

<div class="topic-metadata">

**Author:** [@nobrowser](https://discuss.ocaml.org/u/nobrowser)\
**Replies:** 4\
**Last updated:** [October 24, 2020, 8:44am UTC](https://discuss.ocaml.org/t/stop-opam-blurb-about-environment-sync/6649 "2020-10-24T08:44:58Z")

</div>

Is there any way, when running opam switch, to turn off the blurb about needing opam env next? I want to use opam switch in a script, and it is indeed followed by sourcing the output of opam env. But the blurb is distrac…

---

## [Execute bash script within OCaml \[SOLVED\]](https://discuss.ocaml.org/t/execute-bash-script-within-ocaml-solved/1081)

<div class="topic-metadata">

**Author:** [@jonathandoyle](https://discuss.ocaml.org/u/jonathandoyle)\
**Replies:** 8\
**Last updated:** [November 7, 2017, 4:43pm UTC](https://discuss.ocaml.org/t/execute-bash-script-within-ocaml-solved/1081 "2017-11-07T16:43:29Z")

</div>

Is it possible to execute bash scripts within Ocaml code ? I thought of using Sys.command “bash my\_script” but on my example this returns a 255 error (means an “out-of-range” error, not sure how to interpret it) and doe…

---

## [Anyone using BuckleScript for Windows Scripting?](https://discuss.ocaml.org/t/anyone-using-bucklescript-for-windows-scripting/745)

<div class="topic-metadata">

**Author:** [@yawaramin](https://discuss.ocaml.org/u/yawaramin)\
**Replies:** 3\
**Last updated:** [August 22, 2017, 4:29am UTC](https://discuss.ocaml.org/t/anyone-using-bucklescript-for-windows-scripting/745 "2017-08-22T04:29:17Z")

</div>

Is anyone using BuckleScript (or even JSOO) to target Microsoft’s JScript language in the Windows Scripting Host environment? Since BS can output ES5, a fairly vanilla JS, it should (in theory) be possible. The main prob…
