Sponsored Content
Full Discussion: Remove Duplicate Records
Top Forums Shell Programming and Scripting Remove Duplicate Records Post 302401046 by imipsita.rath on Thursday 4th of March 2010 09:29:55 PM
Old 03-04-2010
Remove Duplicate Records

Hi frinds,
Need your help.
Code:
item , color ,desc
====  ======= ====
1,red ,abc
1,red , a b c
2,blue,x
3,black,y
4,brown,xv
4,brown,x v
4,brown,  x  v

I have to elemnet the duplicate rows on the basis of item.

the final out put will be
Code:
 
1,red ,abc
2,blue,x
3,black,y
4,brown,xv

in duplicate records pick the first row.
kindly help me ,how to make it in unix shell .

Thanks in advance
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Records Duplicate

Hi Everyone, I have a flat file of 1000 unique records like following : For eg Andy,Flower,201-987-0000,12/23/01 Andrew,Smith,101-387-3400,11/12/01 Ani,Ross,401-757-8640,10/4/01 Rich,Finny,245-308-0000,2/27/06 Craig,Ford,842-094-8740,1/3/04 . . . . . . Now I want to duplicate... (9 Replies)
Discussion started by: ganesh123
9 Replies

2. Shell Programming and Scripting

Remove all instances of duplicate records from the file

Hi experts, I am new to scripting. I have a requirement as below. File1: A|123|NAME1 A|123|NAME2 B|123|NAME3 File2: C|123|NAME4 C|123|NAME5 D|123|NAME6 1) I have 2 merge both the files. 2) need to do a sort ( key fields are first and second field) 3) remove all the instances... (3 Replies)
Discussion started by: vukkusila
3 Replies

3. Solaris

How to remove duplicate records with out sort

Can any one give me command How to delete duplicate records with out sort. Suppose if the records like below: 345,bcd,789 123,abc,456 234,abc,456 712,bcd,789 out tput should be 345,bcd,789 123,abc,456 Key for the records is 2nd and 3rd fields.fields are seperated by colon(,). (2 Replies)
Discussion started by: svenkatareddy
2 Replies

4. Shell Programming and Scripting

How to remove duplicate records with out sort

Can any one give me command How to delete duplicate records with out sort. Suppose if the records like below: 345,bcd,789 123,abc,456 234,abc,456 712,bcd,789 out tput should be 345,bcd,789 123,abc,456 Key for the records is 2nd and 3rd fields.fields are seperated by colon(,). (19 Replies)
Discussion started by: svenkatareddy
19 Replies

5. Shell Programming and Scripting

Remove duplicate records

I want to remove the records based on duplicate. I want to remove if two or more records exists with combination fields. Those records should not come once also file abc.txt ABC;123;XYB;HELLO; ABC;123;HKL;HELLO; CDE;123;LLKJ;HELLO; ABC;123;LSDK;HELLO; CDF;344;SLK;TEST key fields are... (7 Replies)
Discussion started by: svenkatareddy
7 Replies

6. Shell Programming and Scripting

Remove somewhat Duplicate records from a flat file

I have a flat file that contains records similar to the following two lines; 1984/11/08 7 700000 123456789 2 1984/11/08 1941/05/19 7 700000 123456789 2 The 123456789 2 represents an account number, this is how I identify the duplicate record. The ### signs represent... (4 Replies)
Discussion started by: jolney
4 Replies

7. UNIX for Dummies Questions & Answers

Need to keep duplicate records

Consider my input is 10 10 20 then, uniq -u will give 20 and uniq -dwill return 10. But i need the output as , 10 10 How we can achieve this? Thanks (4 Replies)
Discussion started by: pandeesh
4 Replies

8. Shell Programming and Scripting

Deleting duplicate records from file 1 if records from file 2 match

I have 2 files "File 1" is delimited by ";" and "File 2" is delimited by "|". File 1 below (3 record shown): Doc1;03/01/2012;New York;6 Main Street;Mr. Smith 1;Mr. Jones Doc2;03/01/2012;Syracuse;876 Broadway;John Davis;Barbara Lull Doc3;03/01/2012;Buffalo;779 Old Windy Road;Charles... (2 Replies)
Discussion started by: vestport
2 Replies

9. Shell Programming and Scripting

Remove duplicate records

Hi, i am working on a script that would remove records or lines in a flat file. The only difference in the file is the "NOT NULL" word. Please see below example of the input file. INPUT FILE:> CREATE a ( TRIAL_CLIENT NOT NULL VARCHAR2(60), TRIAL_FUND NOT NULL... (3 Replies)
Discussion started by: reignangel2003
3 Replies

10. Shell Programming and Scripting

Duplicate records

Gents, Please give a help file --BAD STATUS NOT RESHOOTED-- *** VP 41255/51341 in sw 2973 *** VP 41679/51521 in sw 2973 *** VP 41687/51653 in sw 2973 *** VP 41719/51629 in sw 2976 --BAD COG NOT RESHOOTED-- *** VP 41689/51497 in sw 2974 *** VP 41699/51677 in sw 2974 *** VP... (18 Replies)
Discussion started by: jiam912
18 Replies
Color::Library::Dictionary::NBS_ISCC::RC(3pm)		User Contributed Perl Documentation	     Color::Library::Dictionary::NBS_ISCC::RC(3pm)

NAME
Color::Library::Dictionary::NBS_ISCC::RC - (NBS/ISCC RC) Rock-Color Chart DESCRIPTION
Kenneth L. Kelly and Deanne B. Judd. "Color: Universal Language and Dictionary of Names", National Bureau of Standards, Spec. Publ. 440, Dec. 1976, 189 pages. Color Name Dictionary: (RC) Rock-Color Chart National Research Council, Rock-Color Chart This combinatorial field-work dictionary's 95 names map to 120 colors, using 89 of 267 centoids. This is less redundant than the others. Unfortunately, the focus on rock colors will not make for a general purpose dictionary. <http://swissnet.ai.mit.edu/~jaffer/Color/Dictionaries#RC> COLORS
black black #222222 blackish red blackishred #543d3f bluish white bluishwhite #e9e9ed brilliant green brilliantgreen #6aab8e brownish black brownishblack #3e322c brownish gray brownishgray #5b504f dark greenish gray darkgreenishgray #5e716a dark greenish gray darkgreenishgray #4e5755 dark greenish yellow darkgreenishyellow #98943e dark reddish brown darkreddishbrown #79443b dark yellowish brown darkyellowishbrown #7e6d5a dark yellowish green darkyellowishgreen #355e3b dark yellowish orange darkyellowishorange #be8a3d dusky blue duskyblue #536878 dusky blue duskyblue #36454f dusky blue-green duskybluegreen #3a4b47 dusky brown duskybrown #3e322c dusky green duskygreen #1b4d3e dusky red duskyred #722f37 dusky yellow duskyyellow #a18f60 dusky yellow green duskyyellowgreen #8f9779 dusky yellowish brown duskyyellowishbrown #483c32 dusky yellowish green duskyyellowishgreen #355e3b dusky yellowish green duskyyellowishgreen #3a4b47 grayish black grayishblack #222222 grayish blue grayishblue #536878 grayish blue grayishblue #8c92ac grayish blue-green grayishbluegreen #5e716a grayish blue-green grayishbluegreen #317873 grayish brown grayishbrown #635147 grayish green grayishgreen #5e716a grayish green grayishgreen #317873 grayish olive grayisholive #5b5842 grayish olive green grayisholivegreen #515744 grayish orange grayishorange #c19a6b grayish orange pink grayishorangepink #c7ada3 grayish pink grayishpink #ead8d7 grayish purple grayishpurple #796878 grayish red grayishred #905d5d grayish red grayishred #674c47 grayish red purple grayishredpurple #796878 grayish yellow grayishyellow #c2b280 grayish yellow green grayishyellowgreen #8f9779 greenish black greenishblack #31362b greenish black greenishblack #3a4b47 greenish black greenishblack #1a2421 greenish black greenishblack #4e5755 greenish black greenishblack #1e2321 greenish gray greenishgray #8da399 greenish gray greenishgray #7d8984 light blue lightblue #66aabc light blue green lightbluegreen #66ada4 light bluish gray lightbluishgray #b4bcc0 light brown lightbrown #ae6938 light brown lightbrown #a67b5b light brownish gray lightbrownishgray #8e8279 light gray lightgray #b9b8b5 light green lightgreen #6aab8e light greenish gray lightgreenishgray #b2beb5 light olive lightolive #867e36 light olive brown lightolivebrown #867e36 light olive-gray lightolivegray #8e8279 light olive-gray lightolivegray #8a8776 light red lightred #c08081 medium bluish gray mediumbluishgray #81878b medium gray mediumgray #848482 medium gray mediumgray #555555 medium light gray mediumlightgray #848482 moderate blue moderateblue #367588 moderate blue green moderatebluegreen #317873 moderate brown moderatebrown #6f4e37 moderate green moderategreen #3b7861 moderate greenish yellow moderategreenishyellow #b9b57d moderate olive brown moderateolivebrown #665d1e moderate orange pink moderateorangepink #f4c2c2 moderate orange pink moderateorangepink #d9a6a9 moderate pink moderatepink #dea5a4 moderate red moderatered #905d5d moderate reddish brown moderatereddishbrown #9e4732 moderate reddish orange moderatereddishorange #b4745e moderate yellow moderateyellow #c9ae5d moderate yellow green moderateyellowgreen #8a9a5b moderate yellowish brown moderateyellowishbrown #826644 moderate yellowish green moderateyellowishgreen #679267 olive black oliveblack #363527 olive black oliveblack #57554c olive gray olivegray #57554c pale blue paleblue #66aabc pale blue paleblue #91a3b0 pale blue green palebluegreen #8da399 pale brown palebrown #977f73 pale green palegreen #8da399 pale greenish yellow palegreenishyellow #dadfb7 pale olive paleolive #8c8767 pale pink palepink #e8ccd7 pale purple palepurple #aa98a9 pale red palered #ad8884 pale red palered #977f73 pale reddish brown palereddishbrown #a87c6d pale red purple paleredpurple #aa98a9 pale yellowish brown paleyellowishbrown #ae9b82 pale yellowish green paleyellowishgreen #8da399 pale yellowish orange paleyellowishorange #fad6a5 pinkish gray pinkishgray #c1b6b3 very dark red verydarkred #722f37 very dusky purple veryduskypurple #563c5c very dusky purple veryduskypurple #50404d very dusky purple veryduskypurple #291e29 very dusky red veryduskyred #674c47 very dusky red veryduskyred #43302e very dusky red purple veryduskyredpurple #50404d very dusky red purple veryduskyredpurple #291e29 very dusky red purple veryduskyredpurple #673147 very dusky red purple veryduskyredpurple #38152c very light gray verylightgray #b9b8b5 very pale blue verypaleblue #bcd4e6 very pale green verypalegreen #c7e6d7 very pale orange verypaleorange #bfb8a5 white white #f2f3f4 yellowish gray yellowishgray #bfb8a5 perl v5.14.2 2011-12-07 Color::Library::Dictionary::NBS_ISCC::RC(3pm)
All times are GMT -4. The time now is 04:56 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy