Problem
When using the -n option to sh(C) to check the syntax of a script, it never returns; it runs forever consuming CPU time.
Cause
Any script containing a "while" command will cause sh(C) to behave like this when using the -n option.
For example, running "sh -n test_script" will hang, where "test_script" contains:
:
while false
do
echo hello
done Solution
To work around this problem, use ksh(C)'s -n option instead.
See also
The manual pages for sh(C) and ksh(C)