Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


How can remove duplicates in a file using UNIX?

Answers were Sorted based on User's Feedback



How can remove duplicates in a file using UNIX?..

Answer / j madhava rao

$sort -u filename will sorts the data and removes the duplicates lines from the output

Is This Answer Correct ?    17 Yes 1 No

How can remove duplicates in a file using UNIX?..

Answer / 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

How can remove duplicates in a file using UNIX?..

Answer / prasad

Uniq -u File_name

It will remove duplicates records.

Is This Answer Correct ?    0 Yes 2 No

Post New Answer

More Data Stage Interview Questions

How can remove duplicates in a file using UNIX?

3 Answers   Cap Gemini,


Hi, I am getting data from sequential file like below column1 A&B C&D A&E X&Y&Z v&x But I need the target column as like below column1 A and B C and D A and E X and Y and Z v and x

7 Answers  


Source has 2 columns: USA,NewYork INDIA,MUMBAI INDIA,DELHI UDS,CHICAGO INDIA,PUNE i want data in target like below: INDIA,MUMBAI1 INDIA,DELHI2 INDIA,PUNE3 USA,NEWYORK1 USA,CHICAGO2

0 Answers  


In a table 100 records are there after 50records job is aborted how can u insert all records in target table.

1 Answers   Cap Gemini,


In my project source data comes from MAINFRAME in files.so,This time data is coming as a binary file...I know for binary data we use Complex flat file stage..I have used it also..but on 'view data' data is not coming correctly..as it in MAINFRAME.give me some ideas..

2 Answers  


on how many columns we can perform aggregation in the aggregator stage?

2 Answers   Reliance,


Display all files which have size more 3KB in given directory/folder.

1 Answers   TCS,


how do you pass parameters in a script?

1 Answers   L&T,


if we take 2 tables(like emp and dept), we use join stage and how to improve the performance?

5 Answers   Cap Gemini,


what is the exact difference between dataset and fileset in datastage?

5 Answers   TCS,


Can aggregator and transformer stages use to sort the data? How ?

2 Answers  


How to create a file using vi editor? 2)how to delete a file in vi editor? 3)How to connect the server datastage to unix? what r the command lines we r using? 4)30 jobs r runnig in unix i want to find out my job. how to do this? give me command?

0 Answers   Wipro,


Categories