I know I'm late, but just wanted to add that you can do this in vim. Create a copy of the file, then run
:g!/pattern/d
(delete all lines not having the pattern)
so,
:g!/^\w+ \d+ ct \d+/ \\ view the lines
:g!/^\w+ \d+ ct \d+/d \\ delete lines
More commands can be found here.