basic_awk
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
basic_awk [2015/04/25 10:45] – luke7858 | basic_awk [2024/05/23 07:26] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 12: | Line 12: | ||
awk -F":" | awk -F":" | ||
</ | </ | ||
+ | Grab every instance where column is greater than 4 | ||
<sxh bash> | <sxh bash> | ||
+ | sar -q | awk '$4 >= 4' | ||
</ | </ | ||
+ | Awk for multiple words | ||
<sxh bash> | <sxh bash> | ||
- | + | awk '/Luke|Joe/' | |
- | </sxh>< | + | |
</ | </ | ||
+ | Awk for multiple words case insensitive: | ||
+ | <sxh bash> | ||
+ | awk '/ | ||
+ | </ | ||
+ | awk inversely | ||
+ | <sxh bash> | ||
+ | awk ' | ||
+ | </ | ||
+ | \\ | ||
+ | \\ | ||
+ | <sxh bash> | ||
+ | | awk '$5 ~ / | ||
+ | </ | ||
+ | <sxh bash> | ||
+ | | awk '$5 ~ /[0-9]w/ && $6 ~ /REG/' | ||
+ | </ | ||
+ |
basic_awk.1429958725.txt.gz · Last modified: 2024/05/23 07:26 (external edit)