LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   How to check the bash script syntax? (https://www.linuxquestions.org/questions/linux-general-1/how-to-check-the-bash-script-syntax-437962/)

mesh2005 04-23-2006 06:12 AM

How to check the bash script syntax?
 
How to check the bash script syntax without executing it? I mean using Perl, I can run perl -c 'script name', is there any equivalent command for bash scripts?
Thanks.

cs-cam 04-23-2006 06:21 AM

Why don't you want to execute it? You could run it in a chroot to stop it messing up live data during the test run.

mesh2005 04-23-2006 08:22 AM

can you explain how to execute a script in chroot?
Thanks


All times are GMT -5. The time now is 03:35 PM.