Syntax Check
perl -c filename.pl
php -l filename.pl
bash -n filename.sh
For javascript, you need to follow instruction from http://developer.mozilla.org/en/docs/Introduction_to_the_JavaScript_shell#Getting_and_building_the_JavaScript_shell to install the SpiderMonkey JavaScript Shell and
alias jscheck='/home/khai/jsshell/mozilla/js/src/Linux_All_DBG.OBJ/js -C -f'
jscheck filename.js
If you are using Fedora, you can install the js-1.8.5-7.fc16.x86_64 package ( use yum to search for SpiderMonkey and install appropriate package), and then:
alias jscheck='/usr/bin/js -C -f'
jscheck filename.js
Put the alias file into your .bash_profile
page revision: 2, last edited: 04 Sep 2013 02:37