Save the entire line (using $6 as array index) and in END iterate over the elements of the array:
awk '{z[$6]=$0};END{for (i in z) print z[i]}' logfile
The result won't be sorted though... Don't bother with complex sorting, just runYou could do something like:
awk '{z[$6]=NR" "$0};END{for (i in z) print z[i]}' logfile | sort -k1,1n | cut -f2-
### this space ^ is a literal TAB
which saves the line no. plus the line content to be able to then sort by line no.
Other ways involve a 2nd pass and you'llto get it sorted by date since(since this is a log) but will print duplicate entries if the input contains duplicate lines (entire lines, that is) - e.g. with grep:
awk '{z[$6]=$0};END{for (var in z) print z[var]}' logfile | grep -Fxf- logfile
or do it entirely inonly with awk:
awk 'NR==FNR{z[$6]=$0;next}
FNR==1{for (var in z) y[z[var]]}
$0 in y' logfile logfile