For the benefit of future readers of this thread, the FAQ has now changed and recommends
#!/usr/bin/env -S julia -t 4 -- project
as the header for executable Julia scripts (where you may change the Julia command line options to suit your needs).
None of the above headers work if julia
is an alias, so I made the following to handle this situation as well:
#!/usr/bin/bash -i
#=
exec bash -ic 'julia -t 4 --project "$@"' Julia "${BASH_SOURCE[0]}" "$@"
=#
println.(ARGS, '.')
Again, -t 4 --project
is just an example of some Julia command line options that one could use and println.(ARGS, '.')
is just an example of some Julia code.
This header is much more complex than the one from the FAQ, but as far as I can see it is more general. Please let me know if you find any issues with it, I have only tested it on myself.