Back to the learning path

awk

awk: the initials of its authors Aho, Weinberger and Kernighan Command details
Step 1/3: Pick out columns

awk splits every line into columns at whitespace: $1 is the first, $NF the last, $0 the whole line. {print $2} means "for every line, print column 2".

$ awk '{print $1}' access.log
Fundamentalsawk
Print column 3
Each line of staff.txt has three columns (name, team, salary) aligned with spaces. Use awk to print column 3 of every line.
diffNext lesson:bash