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]

podtech
podtech