> x=`((( foo 3>&- 4>&- ); echo $? >&3)| bar >&4  3>&- 4>&-) 3>&1` 4>&1

Thanks, Loïc. I will consider your solution if I ever have a case like
this again, but my current workaround is rather simple to read and uses
a text buffer for the first command's output. I can do this because I
know that foo's output has a limited size which can be easily handled in
memory. So I choose this way for the sake of readability:

output=$(foo)
result=$?
echo "$output" | bar

I know the solution is somewhat limited, but a feasibly workaround in my
special case. Yours is more refined and really uses pipes.
--
Alexander Kriegisch



_______________________________________________
busybox mailing list
[email protected]
http://busybox.net/cgi-bin/mailman/listinfo/busybox

Reply via email to