Ihor Radchenko <yanta...@posteo.net> writes:

> As for the problem with <shell-file-name> <shell-command-switch> <script-file>
> when <script-file> does not contain shebang, we can trivially at that
> shebang like
>
> (with-temp-file script-file
>               (if shebang (insert shebang "\n")
>                   (insert "#!" shell-file-name "\n"))
>               (when padline (insert "\n"))
>               (insert body))

I am branching off this bug into a new thread.

Reproducer:

#+begin_src dash
  echo This must be empty in dash: "$RANDOM"
#+end_src

#+RESULTS:
: This must be empty in dash:



#+begin_src dash :cmdline 1 2 3
  echo This must be empty in dash: "$RANDOM"
#+end_src

#+RESULTS:
: This must be empty in dash: 25561

The second code block uses shell as evidenced by $RANDOM variable being
initialized. This only happens when :cmdline header argument is
provided.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>

Reply via email to