title: How do I set $? or the return code in Bash?
body: <p>I want to set a return value once so it goes into the while loop:</p>
  
  <pre><code>#!/bin/bash
  while [ $? -eq 1 ]
  do
  #do something until it returns 0    
  done
  </code></pre>
  
  <p>In order to get this working I need to set <code>$? = 1</code> at the beginning, but that doesn't work.</p>