Shell script syntax checker

I have a rather big script that i have written in ksh and it is falling over in two places with a 'test argument' error. I know this usually means that the if statement is not correct, but it is fine. I have looked through the rest of the script for any odd brackets or ` marks, but can't see anything and it's driving me up the wall.

Does anyone know of a windows shell editor that will check the syntax of my script and bring up any possible erorrs?

If you're using ksh or bash, edit the top of your script to include
set -x

i.e.

#!/bin/ksh
set -x
.
.
.

This will show you expansions, etc, as they happen and may show you where/how the error is occuring

Rereading your post - how about syntax highlighting in vim - it will look screwed if a bracket or quote is missing so will highlight that..... (run vim myscript.sh, then :syntax on)

Cheers
ZB

You can also set -n to do a syntax check.