Reputation: 1244
i have code like this:
awk '(/\/\*\!/),(/\*\/\;/)'
that will match everything like this:
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!50001 CREATE TABLE `sometable` (
`id` int(11),
`name` char(30),
`user` char(30),
) ENGINE=MyISAM */;
How can I invert the matching of my awk code above? I tried:
awk '!(/\/\*\!/),(/\*\/\;/)'
awk '!(/\/\*\!/),!(/\*\/\;/)'
Upvotes: 1
Views: 1010
Reputation: 56089
Use a variable
awk '/\/\*!/{a=1}!a;/\*\/;/{a=0}' test.in
A couple other notes:
!
or ;
Upvotes: 3