Consider the following text (incidentally, part of a MySQL dump):
CREATE TABLE `table` ( `id` int(10) NOT NULL auto_increment, `name` varchar(100) NOT NULL default '', `description` text NOT NULL, PRIMARY KEY (`id`), FULLTEXT KEY `full_index` (`name`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */;
I would like to remove the
FULLTEXT key, and I also want to remove the trailing comma on the line above so that the SQL remains valid.
Can anyone come up with (and explain) a
sed recipe to do this?