The UNIX and Linux Forums
>
Top Forums
>
UNIX for Dummies Questions & Answers
How to redirect duplicate lines from a file????
.
User Name
Remember Me?
Password
google unix.com
Forums
Register
Forum Rules
Links
Albums
FAQ
Members List
Calendar
Search
Today's Posts
Mark Forums Read
Thread
:
How to redirect duplicate lines from a file????
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
#
3
(
permalink
)
04-25-2007
marwan
Registered User
Join Date: Mar 2007
Posts: 20
I think it can work by this way also:
sort file1 |uniq -d > file2
this will extract the duplicated lines and redirects them to file2
you can also specify the number of duplication of every line at the begining of the line:
sort file1 |uniq -c > file2
marwan
View Public Profile
Find all posts by marwan
Find marwan's past nominations received
Find marwan's present nominations given