Overview
If input lines come too close to each other in time, some of them may be lost and never printed.
Steps to reproduce
Run
{ for line in 'first line' 'second line' 'third line'; do
echo $line
sleep .01
done; sleep 1; } | umess
One might need to reduce the intermediate sleep time or remove it altogether to see the effect.
Possible solution
When the input read from stdin contains multiple lines, use the last one instead of the first one.
Overview
If input lines come too close to each other in time, some of them may be lost and never printed.
Steps to reproduce
Run
{ for line in 'first line' 'second line' 'third line'; do echo $line sleep .01 done; sleep 1; } | umessOne might need to reduce the intermediate sleep time or remove it altogether to see the effect.
Possible solution
When the input read from
stdincontains multiple lines, use the last one instead of the first one.