# Better support for running external commands

**URL:** <https://discourse.julialang.org/t/better-support-for-running-external-commands/44933>\
**Category:** New to Julia\
**Tags:** run, cmd\
**Created:** [August 14, 2020, 2:18pm UTC](https://discourse.julialang.org/t/better-support-for-running-external-commands/44933 "2020-08-14T14:18:46Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)\
**Post date:** [August 14, 2020, 5:03pm UTC](https://discourse.julialang.org/t/better-support-for-running-external-commands/44933/8 "2020-08-14T17:03:18Z")

</div>

> [@Amin\_Yahyaabadi](#):
>
> For some context, the most used languages don’t have such behavior, and I have not faced such issues in those languages.

The `system` command in other languages executes a shell. `run` in Julia is not a shell — it is a function to directly launch processes (analogous to [`subprocess.call` in Python](https://docs.python.org/2/library/subprocess.html#module-subprocess)). By relying on the shell to launch processes you run into lots of other issues (+ portability problems): [Shelling Out Sucks](https://julialang.org/blog/2012/03/shelling-out-sucks/) … the Python developers also concluded the same thing ([PEP 324](https://www.python.org/dev/peps/pep-0324/#motivation)).

Julia _has_ globbing and pipelines etcetera, but they aren’t implemented with shell _syntax_. They are implemented in Julia, e.g. pipelines via `pipeline(...)` and globbing via [Glob.jl](https://github.com/vtjnash/Glob.jl).

Just don’t expect `run` to be equivalent to `bash`. If you want to launch a shell like `bash` and pass it a string to execute, you can do that in Julia, of course (by spawning the shell explicitly).

---

_[View the full topic](https://discourse.julialang.org/t/better-support-for-running-external-commands/44933)._
