Is there some option I can give to just check the syntax of a [bash] shell script to check the syntax of it, but not actually execute anything nor cause any potential damage?
From the bash(1) man page:
-n Read commands but do not execute them. This may be used to check a
shell script for syntax errors. This is ignored by interactive shells.
Sign up using Google
Sign up using Facebook
Sign up using Stack Exchange
3 years ago