I have a text file named compare.txt that I want to extract the single line that follows every line that contains the pattern "nmse_gain_constant". The following command gets me close:
grep -A 1 nmse_gain_constant compare.txt | grep -v nmse_gain_constant
But this includes a separator "--" line between every line of desired text. Any easy ideas how to get rid of the "--" lines?
I'd give you some example text here, but the "--" characters get erroneously interpreted by this web post as control characters and what you would see is not correct.