How can remove duplicates in a file using UNIX?

Answer Posted / vishwababu

You can use UNIQ to remove duplicates frm a file but it can
consider only same consecutive records.
Ex: if u hve records as
1 vishwa
1 Shruti
2 Ravi
3 Naveen
1 vishwa
and if u use UNIQ cmd, then you wil get vishwa, Ravi, Naveen
and vishwa.
So perform sort before using UNIQ so tat to avoid duplicates

Is This Answer Correct ?    7 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Lookup constraints

844


How to find value from a column in a dataset?

1771


What is the precedence of stage variables,derivations, and constraints?

604


1)How will u implement SCD2 by using surrogate key. 2)What are the disadvantages with surrogate key. 3)How will you handle nulls in your project for the varchar, integer data types. 4)Can I use two fact tables in star schema. 5)3 jobs are running on the 2 nodes after I added one more node so can I compile those jobs to run on three nodes.

3505


how to run a sequential file stage in parallel if the stage is used on the TARGET side

1145






How to Remove Duplicate using SQL?

851


How do you start developing a datastage project?

662


What is the difference between datastage and datastage tx?

600


AGGREGATOR default datatype

938


What is the differentiate between data file and descriptor file?

867


What are the different layers in the information server architecture?

645


What is a merge?

674


Define ds designer?

770


1.what is repartionoing technique? 2.what deliverables transferred to client using datastage? 3.how to write loop statements using nested loop sequence?

1810


Which is the best institute in Hyderabad to learn OBIEE and DataStage?Please tell me faculty name also

2749