title: Process Lines Not Containing String And Output Line Below Matched Line Too
body: <p>I have a good idea of what I can do here, using <code>grep -v '^--'</code> and <code>grep -A 1</code>, however I think I might need to use awk to match instead. </p>
  
  <p>I have data that looks like this:</p>
  
  <pre><code>Random text line 1
  --Data1
  Random text line 2
  --Data2
  Random text line 3  
  --Data3
  Random text line 4  
  --Data4
  Random text line 5  
  --Data5
  </code></pre>
  
  <p>The thing is, I need to run a command - let's call it <code>command1</code> on all lines NOT starting with '--' and capture the output along with the line below it.</p>
  
  <p>So the three commands I want to combine are:</p>
  
  <p><code>grep -v '^--' file.txt | command1 &gt; text-output</code></p>
  
  <p><code>grep -A 1 [not sure] &gt; --data-below-text</code></p>
  
  <p>I could probably do this by storing variables in a <code>while read line; do</code> type of command and then store and echo variables. However, I feel like there might be an easier way that is more efficient way to get the following: </p>
  
  <pre><code>Random text line 1, text-output, --Data1
  Random text line 2, text-output, --Data2
  Random text line 3, text-output, --Data3
  Random text line 4, text-output, --Data4
  Random text line 5, text-output, --Data5
  </code></pre>
  
  <p>Of course, if using variables is the only way, I'm open to doing that as well. I just wanted to make sure since I know variables can get dicey if I decide to use the code in parallel down the road. Any direction is greatly appreciated. </p>