title: using ksh shebang in a bash script
body: <p>We will perform a migration from unix to Linux.
  the typeset -L only works with ksh</p>
  
  <p>I created the following file:</p>
  
  <pre><code>#!/bin/ksh -u
  
  echo $SHELL
  typeset -L21 RUN_LOGL="LOG_FILE    "
  </code></pre>
  
  <p>Normally the shebang should indicate the correct interpreter (ksh). But when I call the script in a bash way:</p>
  
  <pre><code>$ . test.ksh
  </code></pre>
  
  <p>The output is:</p>
  
  <pre><code>/bin/bash
  
  -bash: typeset: -L: invalid option
  
  typeset: usage: typeset [-aAfFilrtux] [-p] name[=value] ...
  </code></pre>
  
  <p>the script is interpreter in bash way , and typeset -L is not accepted.
  whereas if I simply call</p>
  
  <pre><code>$test.ksh
  </code></pre>
  
  <p>it runs fine.</p>
  
  <p>Is the way we call the script (bash way or ksh way) important enough to ignore the shebang ?</p>
  
  <p>Thank you in advance.</p>