Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
linux_wiki:awk [2016/03/28 22:18] billdozor [Awk] |
linux_wiki:awk [2016/05/30 17:10] billdozor [Print Line After Match] |
||
---|---|---|---|
Line 10: | Line 10: | ||
**Checklist** | **Checklist** | ||
* Distro(s): Any | * Distro(s): Any | ||
- | * Software: gawk installed | + | * Software: |
---- | ---- | ||
Line 48: | Line 48: | ||
true | true | ||
</ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== Print Line After Match ===== | ||
+ | |||
+ | Search for a regex string and print the line AFTER the match. | ||
+ | |||
+ | <code bash> | ||
+ | awk '/ | ||
+ | </ | ||
+ | * mystring => regex string to search for | ||
+ | * getline => set the line $0 to the next line | ||
+ | * print => print the line | ||
---- | ---- |