Better support for running external commands

,

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). By relying on the shell to launch processes you run into lots of other issues (+ portability problems): Shelling Out Sucks … the Python developers also concluded the same thing (PEP 324).

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.

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).

20 Likes