|
|||||||
| Forums | Search Forums | Register | Forum Rules | Man Pages | Albums | FAQ | Members | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Duplicate files and output list
Gents, I have a file like this. Code:
1 1 1 2 2 3 2 4 2 5 3 6 3 7 4 8 5 9 I would like to get something like it Code:
1 1 2 2 3 4 5 3 6 7 Thanks in advance for your support Last edited by Scott; 10-23-2012 at 03:42 PM.. Reason: Code tags |
| Sponsored Links | ||
|
|
#4
|
|||
|
|||
|
Thansk a lot its works perfect... ---------- Post updated at 01:12 PM ---------- Previous update was at 01:01 PM ---------- Please, how I can get only the duplicate files Code:
1 1 2 2 3 4 5 3 6 7 Last edited by Scott; 10-23-2012 at 03:42 PM.. Reason: Code tags |
| Sponsored Links | |
|
|
#5
|
|||
|
|||
|
What do you mean by this...
|
| Sponsored Links | |
|
|
#6
|
|||
|
|||
|
If you mean duplicate lines then use: Code:
uniq -d |
| Sponsored Links | |
|
|
#7
|
|||
|
|||
|
I found the solution like this Code:
awk '{a[$1]=a[$1] " " $2}END{for(i in a){print i a[i]}}' infile | sort | awk '{if(NF>2)print $0}'Thanks Last edited by Scott; 10-23-2012 at 03:42 PM.. Reason: Code tags |
| Sponsored Links | ||
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| list files command output | kannan84 | Shell Programming and Scripting | 1 | 02-09-2012 11:34 PM |
| I need a script to find socials in files and output a list of those files | NewSolarisAdmin | Shell Programming and Scripting | 1 | 02-19-2009 12:01 PM |
| Find duplicate value comparing 2 files and create an output | ricky007 | Shell Programming and Scripting | 2 | 02-26-2008 03:57 PM |
| Dynamically redirect output to duplicate files ??? | nsinha | Shell Programming and Scripting | 3 | 10-09-2007 07:04 AM |
| Removing duplicate files from list with different path | vino | Shell Programming and Scripting | 10 | 05-12-2005 08:44 AM |
|
|