This is a easiest way to export all procedures alone from specified database through Terminal. Using mysqldump we can do this. General syntax of the command is as follows,
mysqldump -u [db username] -h [db server name] -p --routines --no-create-info --no-data --no-create-db --skip-opt [database name] > [path to the destination]/filename.sql
After enter the command in Terminal press ENTER, then the Terminal will prompt to enter database password where you have to provide the database password. Then you can check the path which you specified to save the .sql file. In the specified path you can see the export file.