awk
awk 'script' filename | where 'script' is a set of commands that are understood by awk
Basic
- filter | pattern
- filter c*m | example all words with com cam cem etc
- use *
- Take for example the set [al1], here awk will match all strings containing character a or l or 1 in a line in the file /etc/hosts.
- matches strings starting with either K or k followed by T
- It matches all the lines that start with the pattern
- It matches all the lines that end with the pattern
Standard use cases
- filter out row | print second row (NAME) | docker service