Shell Command to make environmental variables

The julia run function executes programs. The shell command export is not a program, it’s a builtin shell command. If you want to start a shell from julia you can do it explicitly with e.g. run(`/bin/bash -c "<some shell command>"`)

The command is never run with a shell. Instead, Julia parses the command syntax directly, appropriately interpolating variables and splitting on words as the shell would, respecting shell quoting syntax. The command is run as julia’s immediate child process, using fork and exec calls.

https://docs.julialang.org/en/v1/manual/running-external-programs/

2 Likes