<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jun 20, 2013 at 4:01 PM, Erez D <span dir="ltr"><<a href="mailto:erez0001@gmail.com" target="_blank">erez0001@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div><div>how can i pipe one command to another and get the return value from the first<br>
</div><div><br></div><div>e.g.<br></div></div></div>make | tee log ; x=$?<br><br></div>x holds the return value of 'tee'<br>
</div>however i want the return value of 'make'<br><br><br>any idea ?<br><br><br></div>
</blockquote></div>i should have searched better ...<br><br></div><div class="gmail_extra">i found it using $PIPESTATUS[0] ...<br><br><br></div><div class="gmail_extra">cheers,<br></div><div class="gmail_extra">erez.<br>
</div></div>