#!/bin/sh

cat $* \
  | awk '{lfreq[$0]++}\
         {printf "%s", $0}\
         {if (lfreq[$0]>1) print " (duplicate)"; else print ""}'
