perl -wMstrict -pe "BEGIN { our $armed } $::armed = /\A \\macroa \s/x ? 1 : /\A \\macrob \s/x && $::armed && ! print qq{\n}" infile > outfile