dear julia experts—Is it possible to to invoke julia in batch but still receive the output as if the session was interactive REPL? maybe this could be done by tricking the session into thinking it is interactive, even though stdin comes from a file. for example, if my script ‘a.jl’ contains
x=[1,2,3]
x+22
I want to see (or construct) an output ‘a.log’ that looks like
I am thinking of using the Unix expect command, but this one has its own drawbacks, not the least of which is that julia prompts in boldface and I do not know how to turn this off. (julia --color=off does not turn off boldfacing afaics.)
(the use for this feature is to write tests for interactive sessions.)
hi stefan—I had written a response why julia -i < a.jl does not work, but then decided to try, on the spur of the moment, cat a.jl | julia -i. The latter works, the former does not. I always thought the two were completely identical and indistinguishable from the perspective of the receiving program. (how does julia know the difference??) thanks. solves my problem.