It amazes me at work how many people just violate UUOC/UUOG
ie..
cat file | grep bar | awk '{ print $1 }' | sort | uniq
which can simply be awk '/bar/ { print $1 | "sort -u"}' file