Louis I. answered 05/27/19
Computer Science Instructor/Tutor: Real World and Academia Experienced
Yes there is!
Use the "-n" option ... bash will check the syntactical validity of a script without running it.
See script usage details below.
$ cat tester
echo "Hello, World!"
for i in 1 2 3 4 5
do
echo $i
done
for i
$ bash -n tester
tester: line 9: syntax error: unexpected end of file