From: Sven Mascheck on
lihao wrote:

> /path/to/ 2>/dev/null | tee /path/to/log_file
> I want to check the output from script '/path/to/'
> immediately without having to wait for the buffer to be full.

> [...] BTW. most of the output in the script "/path/to/"
> are from the 'echo' command.

In that case, sh -c "echo x;sleep 1"|tee, I can't see any block buffering.
Not even with sh -c "echo x|grep .;sleep 1"|tee.
What and how many commands in your script are fully buffered?