Quote:
Originally Posted by era
Code:
perl -ne '$l = lc(); print if $m{$l}++; ' file
lc returns the specified string in lowercase; in this case, with no parameter, it defaults to the current input line. $m{$l} is the count of number of times we have seen $l; if it's nonzero, it's a duplicate, so we print it.
|
thanks it's worked for one file, but i forgot to add that if i need it to run on a directory and make sure to do in on a file only and not subdirectory
what modifications would you do