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

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License