How to execute Symfony Console command in any project subdirectory

With this script on your path, you can execute the command console  to execute the Symfony Console command in any of the project subdirectory.

Save the follow script as  console  (or choose other name, like “sf”) on /usr/local/bin or other location specified on your $PATH variable.

Remember to change the permissions to execute:

Now you can go to any subdirectory of your Symfony project and execute the console just typing “console”.