Se você estiver usando o sistema Linux, você pode tentar:
grep -A1 "C02" ~/temp/log.txt
OPTIONS
-A NUM, --after-context=NUM
Print NUM lines of trailing context after matching lines. Places a line containing -- between contiguous groups of matches.
-B NUM, --before-context=NUM
Print NUM lines of leading context before matching lines. Places a line containing -- between contiguous groups of matches.
-C NUM, --context=NUM
Print NUM lines of output context. Places a line containing -- between contiguous groups of matches.
Você pode usar o awk também como:
awk '/C02/{print;getline;print}' ~/temp/log.txt