Process text by fields and patterns; fields are separated by whitespace by default.
awk '{print $1}' access.logLINUX COMMAND ATLAS · COMMAND GUIDE
Process text by fields and patterns; fields are separated by whitespace by default.
GNU Awkawk [OPTION]... 'PROGRAM' [FILE]...
Process text by fields and patterns; fields are separated by whitespace by default.
awk '{print $1}' access.logPrint the first colon-separated field.
awk -F: '{print $1}' /etc/passwdPrint the first and third fields where the third exceeds 100.
awk '$3 > 100 {print $1, $3}' scores.txtawk implementations differ; extensions such as -i are specific to GNU awk. Quote programs to protect them from the shell.