Is it possible to capture the stdout from the sh DSL command in the pipeline
<p>For example:</p>

<pre><code>var output=sh "echo foo";
echo "output=$output";
</code></pre>

<p>I will get:</p>

<pre><code>output=0
</code></pre>

<p>So, apparently I get the exit code rather than the stdout. Is it possible to capture the stdout into a pipeline variable, such that I could get:
<code>output=foo</code>
as my result?</p>