User Tools

Site Tools


awk:display_line_after_the_matching_string

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
awk:display_line_after_the_matching_string [2021/01/06 16:30] – [AWK - Display line after the matching string] peterawk:display_line_after_the_matching_string [2021/01/06 17:04] (current) – [AWK - Display line after the matching string] peter
Line 5: Line 5:
 </code> </code>
  
-<WRAP info> 
-**NOTE:**  This actually displays the next line; but also all other rows that contain the search string. 
-</WRAP> 
  
 ---- ----
Line 35: Line 32:
 11   Virginia  Genevive  Roux        45 11   Virginia  Genevive  Roux        45
 </code> </code>
 +
 +<WRAP info>
 +**NOTE:**  This simply returns the next line after the search string of **Peter**.
 +</WRAP>
 +
  
 ---- ----
Line 50: Line 52:
 13   David     Bruce     Stevenson   48 13   David     Bruce     Stevenson   48
 </code> </code>
 +
 +<WRAP info>
 +**NOTE:**  This finds the search string **Roux** in row 10, so it includes the next row 11 in the result; even though row 11 also contains the same search string.
 +
 +It then proceeds with row 12 which also contains the search string **Roux**, so it includes row 13 in the results.
 +
 +No further rows contain the search string so nothing else is added to the result.
 +</WRAP>
 +
  
 ---- ----
Line 66: Line 77:
 48   Adam      Winter    Ridley      23 48   Adam      Winter    Ridley      23
 </code> </code>
 +
 +<WRAP info>
 +**NOTE:**  This finds the search string **4** in row 10, so it includes the next row 11 in the result; even though row 11 also contains the same search string.
 +
 +It then proceeds from row 12.  It does not find the search string **4**, so moves to row 13.
 +
 +In row 13 it finds the search string **4**, so it includes the next row 14 in the results; even though row 14 also contains the same search string.
 +
 +It then proceeds from row 15.
 +
 +The last row contains the search string; and as there is no other row below that can be added to the result; the last row itself is added.  Possibly a bug?
 +</WRAP>
 +
 +
  
 ---- ----
awk/display_line_after_the_matching_string.1609950659.txt.gz · Last modified: 2021/01/06 16:30 by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki