Using nohup with Julia prints everything out as if it's REPL. Can this be avoided?

61 Views Asked by At

Let's say I have a Julia script called myscript.jl. It contains the following code:

x = 3

When I call this script using nohup:

nohup julia < myscript.jl > out_myscript.log &

I get this on the out_myscript.log

3

I tried putting a semicolon at the end of x = 3; statement but it makes no difference. In reality, my scripts do operations on very huge matrices, sizes of 15000x90 which are also printed on the .log file in their entirety. This makes browsing the log file very tedious and it's size also becomes gigantic. Is there a way to avoid this behavior?

Thanks, Yasir

1

There are 1 best solutions below

0
Sundar R On BEST ANSWER

Use

nohup julia myscript.jl > out_myscript.log &

instead of

nohup julia < myscript.jl > out_myscript.log &

i.e. pass myscript.jl as an argument to Julia, instead of redirecting it as stdin with <.