I can't use built-in bash commands when running a script using 'sh'
<p>When I execute my script <code>sh myscript.sh</code>  I get an error message which states that <code>[[:</code> is an 'unexpected operator', however when i run my script in a bash emulator (<a href="http://www.tutorialspoint.com/execute_bash_online.php" rel="nofollow noreferrer">http://www.tutorialspoint.com/execute_bash_online.php</a>) it works and doesn't return this error. Furthermore, when i run the script using <code>sh</code> within the emulator it works and doesn't return the error even though on my server it would.</p>

<p>I've checked the link below and, from what i understand, i need to use the <code>bash</code> command. What is wrong with the <code>sh</code> command and how do i enable functions such as <code>[[:</code> to be executed?</p>

<p>NOTE: I am a student and therefore i can only run the bash terminal in school. So any help that will guarantee that this error will not be returned will be hugely appreciated.</p>

<p><a href="https://stackoverflow.com/questions/3411048/unexpected-operator-in-shell-programming">[ :Unexpected operator in shell programming</a></p>