in reply to perl one line for advanced grep (current line and next one)
Here is my humble variation:
perl -ne "print if /error/ || $last=~/error/; $last=$_;" test_log.txt
Yes, I watch meteor showers
No, I do not watch meteor showers
My meteors prefer to bathe
Results (168 votes). Check out past polls.