That awk command in between the first and second pipes would reduce the output from the who command to just the first string on every line. The sort command then arranges these in alphabetical order ...