title: Why getting a syntax error near unexpected token on running a shell script in Ubuntu?
body: <p>I'm trying to run NS-2 simulation on Ubuntu OS.</p>
  
  <p>To be honest, I'm new to Ubuntu OS and to batch files.</p>
  
  <p>By typing:</p>
  
  <pre><code>bash bat.sh
  </code></pre>
  
  <p>I'm getting the following error:</p>
  
  <pre><code>bat.sh: line 1: syntax error near unexpected token `%%a'
  'at.sh: line 1: `for /L %%a in (200,380,4000) do (
  </code></pre>
  
  <p>bat.sh:</p>
  
  <pre><code>for /L %%a in (200,380,4000) do (
  ns lab5.tcl %%akb )
  </code></pre>
  
  <p>The second row is exactly what I want to do. I'm sending a variable of 200 kb, 580 kb and so on. </p>
  
  <p>Running this batch file on windows works fine.</p>