From: "mcphersonz@..." Date: 2008-06-09T18:55:00+09:00 Subject: finding duplicated lines in folder for refactoring purposes Hello. I am wondering if anyone knows of a good trick to identify duplicated lines in a directory for refactoring purposes. The idea is this: If I can get a listing of all lines, by file in a directory (recursively) then refactoring code could be focused eliminating "repeated" lines. The solution would involve - recursively searching all files in a given path - displaying a list of repeated lines (ignoring case and whitespace) - grouping results by path/filename combination - sorting results by line repeat count - ideally only displaying lines that are repeated at lease once... I'm thinking this should exist either via a application, ruby script, or shell script. Does anyone know if any ideas or solutions that are remotely close to this? -Shannon