Usage of #!/bin/sh vs #!/bin/bash shell scripts?

Some question about the usage of shell scripts:
1.) Are the commands of the base shell scripts a subset of bash commands?

2.) Assume I got a long, long script WITHOUT the first line.
How can I find out if the script was originally designed f�r "sh" or "bash"?

3.) How can I check a given script for syntax (not: logical) errors?

4.) Currently I have to enter

./myscript

to execute a certain script

How can I setup Linux so that the leading ".7" is not necessary any more?

Peter

1) It is other way around. ie bash is a superset of sh.

2) without shebang line, i guess have to go through the scirpts , IMHO.

3) bash -n option can be helpful here with its own limitations.

bash -n <file>

check bash man page.

4)

Could you explain a bit here ?

Certainly a typo, Peter means ./
Answer:
You can put the . in your PATH, and define it in the login files; e.g. in .profile have

export PATH=/bin:/usr/bin:/usr/sbin:/sbin:.

For safety reasons the . should be after the standard pathes, so an "ls" will run /bin/ls or /usr/bin/ls, not a ./ls
BTW the answer for 1) is a plain yes.

You might consider creating your own dedicated directory for the script in question (and those that will follow :). Put that directory in your path, not the ".".

Juha