Thursday, April 29

Executing shell scripts from NetBeans

One of the most interesting things in Komodo was the option to add some scripts and execute them in the project without leaving the IDE, usually this looks trivial but it's a great way of performing some batch processes and speed up your development.

Now we'll review how to do the same thing in NetBeans

1. At the project list, right click the project you want to add the script, select preferences
2. At the open preferences go to "Run Configuration"
3. Create a new configuration, give any name you want
4. At the combo-box select the last option "Script (run in command line)"
5. Uncheck the "Use default PHP Interpreter"
6. At "PHP Interpreter" box type the interpreter of your script, for example for a bash script /bin/bash
7. For the index file select the script you want to run
8. Optionally add the arguments needed for your script
9. Close the window
10. Now at the menubar open the Run submenu
11. Set the Project Configuration to run your newly created configuration

12. Just press F6 (default) or click the run button to run your script


  1. hey thanks for the post... is exactly what i was looking for to run a shell script to push files to a VM server.

  2. yes, thanks for the hint! really useful for me to compress and minify my JavaScript library within NetBeans. I was sure it must be possible but I couldn't figure out how to do it ...