Hi Thorsten,

On mer., 2017-03-22 at 19:39 +0000, Thorsten Glaser wrote:
> Martijn Dekker dixit:
> 
> >Op 22-03-17 om 10:12 schreef Jean Delvare:
> >> Concretely, the customer's code looks like this:
> >>
> >> command | while read line
> >> do
> >>      if <condition>
> >>      then
> >>              exit
> >>      fi
> >>      process $line
> >> done
> >[...]
> >> I was wondering if there is any other trick you can suggest that would 
> >> work in mksh?
> 
> This is actually a FAQ ;-) Use co-processes!
> 
> command |& while read -p line; do …

Looks good, thank you very much :-)

-- 
Jean Delvare
SUSE L3 Support

Reply via email to