Migrating kornshell scripts from solaris 10 to RHEL 7.5
/bin/sh
is used to execute shell scripts in RHEL 7.5
$ ls -l /bin/sh
lrwxrwxrwx. 1 root root 4 Jul 16 12:10 /bin/sh -> bash
So, we would like to first parse the complete code to verify their syntax but not execute it,
For example:
sleep 20
echo test
cd /a/b/c
connect # instead of ./connect
should just parse the code but not execute it
What is the approach to just parse the code? to verify syntax without executing it.