4th Floor, 4 Tabernacle Street London EC2A 4LU

Extract CREATES from SQL dump

If you are trying to extract the create routines from a SQL dump, this might help you!

Basically it picks out the contents between “CREATE” and “\;”

You can modify these two variables as need be..

 

[bash]

cat dump.sql |awk ‘/CREATE/,/\;/ { print $0 ; }’ > create.sql

 

[/bash]