title: Is it possible to get the exit code from a subshell?
body: <p>Let's imagine I have a bash script, where I call this:</p>
  
  <pre><code>bash -c "some_command"
  do something with code of some_command here
  </code></pre>
  
  <p>Is it possible to obtain the code of <code>some_command</code>? I'm not executing <code>some_command</code> directly in the shell running the script because I don't want to alter it's environment.</p>