Is it possible to check the script syntax with some sort of command...? Without running the script .
I'm using Sun Solaris
sh -n
There is more to this story. Here are a few other options you can use:
Debugging Options set -o Option Command-line Option Action
noexec -n Don't run commands; check for syntax errors only
verbose -v Echo commands before running them
xtrace -x Echo commands after command-line processing
See more in this link
Thanks a lot!