Am kind of newbie in writing shell scripts in linux. Its a `csh` script but am running it in the `bash` shell that why I used `#!/bin/bash` instead of `#!/bin/csh`.

```
  1 #!/bin/bash
  2 set i = 1
  3 echo it starts
  4 
  5 while ($i <= 5)
  6         echo i is $i
  7         @ i= $i +1
  8 end

```

\*\*Note: \*\* The numbers are just to number the lines.

The above code gives me the output with error: 

> 
> 
> ```
> it starts
> ./me.csh: line 9: syntax error: unexpected end of file
> 
> ```
> 
> 

I can't figure out what is wrong even though it echos `it starts` and there is no line number 9 as specified in the error.