in reply to Re: Printing to STDOUT buffered when invoking Perl within a bash-script using tee
in thread Printing to STDOUT buffered when invoking Perl within a bash-script using tee
I have tried this but the fact the Perl script is NOT buffered when ran as a standalone script or when tee/exec is not used within the Bash script suggests to me it's not an issue with the Perl script itself but rather it's interaction with the Bash.
Update 1: I had tried $|=1; however the fact that NO buffering occurs when the Perl script is run as a standalone or when exec/tee is not used within the Bash script, suggests to me that it's not an issue inherent to the Perl but rather a problem with its interaction with Bash.
Update 2: $|=1; now appears to work and solves the issue - i'm not sure why it did not before.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Printing to STDOUT buffered when invoking Perl within a bash-script using tee
by haukex (Archbishop) on Dec 05, 2016 at 15:24 UTC |