[TriLUG] Search for Duplicate Filename, Ignore Extension

Robert Dale robdale at gmail.com
Wed Nov 2 14:40:33 EDT 2011


Numbers and greedy matching were messing it up. Also added
case-insensitive to sort + uniq.

cat files.txt | cut -f 1 -d '#' | sort -f | uniq -ic | grep -v "^\s*1"
| awk '{print $2}' | while read dupe; do grep -i ${dupe}\# files.txt;
done

On Wed, Nov 2, 2011 at 2:25 PM, Brian Blater <brb.lists at gmail.com> wrote:
> awk '{print $2}' | while read dupe; do grep -i ${dupe}\# /another/path/files.txt;



--
Robert Dale



More information about the TriLUG mailing list