title: Any way to exit bash script, but not quitting the terminal
body: <p>When I use <code>exit</code> command in a shell script, the script will terminate the terminal (the prompt). Is there any way to terminate a script and then staying in the terminal?</p>
  
  <p>My script <code>run.sh</code> is expected to execute by directly being sourced, or sourced from another script.</p>
  
  <p>EDIT:
  To be more specific, there are two scripts <code>run2.sh</code> as</p>
  
  <pre><code>...
  . run.sh
  echo "place A"
  ...
  </code></pre>
  
  <p>and <code>run.sh</code> as</p>
  
  <pre><code>...
  exit
  ...
  </code></pre>
  
  <p>when I run it by <code>. run2.sh</code>, and if it hit <code>exit</code> codeline in <code>run.sh</code>, I want it to stop to the terminal and stay there. But using <code>exit</code>, the whole terminal gets closed. </p>
  
  <p>PS: I have tried to use <code>return</code>, but <code>echo</code> codeline will still gets executed....</p>