User Tools

Site Tools


basic_awk

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
basic_awk [2016/02/25 12:03] luke7858basic_awk [2024/05/23 07:26] (current) – external edit 127.0.0.1
Line 16: Line 16:
 sar -q | awk '$4 >= 4' sar -q | awk '$4 >= 4'
 </sxh> </sxh>
 +Awk for multiple words
 <sxh bash> <sxh bash>
- +awk '/Luke|Joe/' test
-</sxh><sxh bash> +
 </sxh> </sxh>
 +Awk for multiple words case insensitive: 
 +<sxh bash>
 +awk '/Luke|Joe/i' test
 +</sxh>
 +awk inversely 
 +<sxh bash>
 +awk '!/Luke/' test
 +</sxh>
 +\\
 +\\
 +<sxh bash>
 +| awk '$5 ~ /[0-9]w/'
 +</sxh>
 +<sxh bash>
 +| awk '$5 ~ /[0-9]w/ && $6 ~ /REG/'
 +</sxh>
 +
basic_awk.1456401830.txt.gz · Last modified: 2024/05/23 07:26 (external edit)

Except where otherwise noted, content on this wiki is licensed under the following license: Public Domain
Public Domain Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki