On Thu, Apr 7, 2016 at 9:45 AM, Alex Dowling <[email protected]> wrote:
> Hello Yichao,
>
> Vanished. I expect println output between other output that is properly
> redirected. I should also mention println output is not properly redirected
> (i.e., vanishes) using nohup.

So the output does not appear even when the whole script exit?
Also see my link about script below.

>
> Alex
>
> On Thursday, April 7, 2016 at 8:05:30 AM UTC-5, Yichao Yu wrote:
>>
>> On Thu, Apr 7, 2016 at 8:12 AM, Alex Dowling <[email protected]> wrote:
>> > Hello,
>> >
>> > I have a Julia script that does some analysis and includes println()
>> > statements. When I use julia my_code.jl > output.txt 2>&1 from a Linux
>> > command line, output from optimization solvers (IPOPT, Gurobi) are
>> > redirected to output.txt but output from println() just vanishes. They
>> > aren't in output.txt or printed to the console.
>>
>> Are they vanished or delayed? The output is buffered.
>>
>> >
>> > One option I found (haven't tested) is using redirect_stout() and
>> > redirect_sterr(): https://github.com/JuliaLang/julia/issues/12050.
>> > Ideally
>> > I'd like to redirect println output without modifying the script.
>>
>> http://man7.org/linux/man-pages/man1/script.1.html
>>
>> >
>> > Thanks,
>> > Alex

Reply via email to