logo

How to Provide Code for Execution in External Commands in Julia 📂Julia

How to Provide Code for Execution in External Commands in Julia

Code

When using the Julia command, simple or short code can be executed immediately by entering julia -e "a specific command". This is useful when Julia itself serves as a lightweight auxiliary tool rather than a large-scale program.

PS C:\> julia -e "sum(1:10) |> print"
55