Tag Archives: awksqldump

Extract particular table from a mysqldump file

$ awksqldump dbname.dump.sql tblname #!/bin/bash ### check parameter E_NO_ARGS=65 if [ $# -eq 2 ] then # Outputs string of specified table only awk “/Table structure for table .$2./,/UNLOCK TABLES/{print}” $1 > $1.EXTRACTED.sql elif [ $# -eq 3 ] then … Continue reading

Posted in Bash script, Database, Linux Administration, MySQL | Tagged , | Leave a comment