If you ever had a problem with a MySQL Table being foobar because of a human error (or other bug), you might need to be able to restore only 1 single MySQL table.
Restoring an entire Database may cause other data loss, and this is of course something we don’t want.
So, if you have a mysql dump available, you can ‘filter’ our that specific table by using the sed command.
Let say the name of your table is tableToRestore and the file dbdump.sql is the file containing your database backup:
$ sed -n -e '/CREATE TABLE.*tableToRestore /,/CREATE TABLE/p' dbdump.sql > dbdump_tableToRestore.sql
This will copy in the file dbdump.sql what is located between CREATE TABLE tableToRestore and the next CREATE TABLE corresponding to the next table.
You can then adjust the file dbdump_tableToRestore.sql which contains the structure of the table tableToRestore, and the data (a list of INSERT commands).