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?
A here-string with a command substitution:
while read line
do
if <condition>
then
exit
fi
process $line
done <<<$(command)
Hope this helps,
- M.
