![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Loop through only the distinct values in a file | pbekal | Shell Programming and Scripting | 2 | 02-06-2008 02:47 PM |
| Pick the exact value | ahmedwaseem2000 | Shell Programming and Scripting | 11 | 01-22-2008 08:06 AM |
| Number of days between two distinct dates | radheymohan | UNIX for Advanced & Expert Users | 1 | 10-16-2007 05:39 AM |
| Count No of Records in File without counting Header and Trailer Records | guiguy | Shell Programming and Scripting | 2 | 06-07-2007 09:15 AM |
| select distinct row from a file | merry susana | UNIX for Dummies Questions & Answers | 7 | 05-03-2005 03:54 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
how to pick distinct records..........
How can i pick distinct records which consists of duplicate data from a ASCII file using UNIX commands
|
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
Try uniq command.
|
|
#3
|
|||
|
|||
|
uniq
first u need to sort the file and use the uniq command to get the correct lines
without any duplicates sort the file and use the uniq command |
|
#4
|
||||
|
||||
|
Use 'sort -u' if your file isn't already sorted.
|
||||
| Google The UNIX and Linux Forums |