awk
This is an old revision of the document!
Warning: Undefined variable $state in /usr/share/nginx/html/lib/plugins/tabinclude/helper.php on line 130
Warning: Undefined variable $html in /usr/share/nginx/html/lib/plugins/tabinclude/helper.php on line 240
Apache vhost
- Basic awk]]
The following prints all lines in the file specified. You can also replace $0 with nothing.
1 |
awk '{ print $0 }' |
1 |
awk -F ":" '{ print $1 }' /etc/passwd |
You can also select multiple columns and separate them with a space for a better format
1 |
awk -F ":" '{ print $1 " " $2 }' /etc/passwd |
1 |
sar -q | awk '$4 >= 4' |
1 |
awk '/Luke|Joe/' test |
1 |
awk '/Luke|Joe/i' test |
1 |
awk '!/Luke/' test |
1 |
| awk '$5 ~ /[0-9]w/' |
1 |
| awk '$5 ~ /[0-9]w/ && $6 ~ /REG/' |
awk.1429958012.txt.gz · Last modified: 2024/05/23 07:26 (external edit)