title: sh return: can only `return' from a function or sourced script
body: <p><strong>return statement error:urn: can only `return' from a function or sourced script in shell script</strong>
  myscript.sh</p>
  
  <pre><code>#!/bin/bash
  if [ $# -ne 2 ]
  then
      echo "Incorrect Usage : Arguments mismatch."
      return 2
  fi
  
  mv $1 $2
  
  return 0
  </code></pre>
  
  <p>When i try to run</p>
  
  <p>sh myscript.sh</p>
  
  <pre><code>Incorrect Usage : Arguments mismatch.
  myscript.sh.sh: line 5: return: can only `return' from a function or sourced script
  </code></pre>
  
  <p>how to fix that error ?</p>