Add an extra column after grep content
<p>I understand that grep can extract the specific content from a file line by line. 
Just wondering how can add another column before or after each line as an index. 
For example: </p>

<pre><code>grep "aaa"  text.txt &gt; tmp.txt
</code></pre>

<p>In the tmp.txt file, we can see the content as follows, </p>

<pre><code>aaawekjre
qejrteraaa
wrgeaaaere
</code></pre>

<p>However, I would like to add a specific index as an extra column. 
Therefore, the tmp.txt might look like this:</p>

<pre><code>John aaawekjre
John qejrteraaa
John wrgeaaaere
</code></pre>