The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
how to remove duplicate lines fredao Shell Programming and Scripting 3 12-13-2006 12:51 PM
Remove duplicate phrase kesu2k Shell Programming and Scripting 6 10-17-2006 04:34 PM
Remove duplicate ??? sabercats Shell Programming and Scripting 3 03-10-2006 07:06 PM
Remove Duplicate line Student37 UNIX for Dummies Questions & Answers 1 02-22-2005 03:00 PM
remove duplicate kazanoova2 Shell Programming and Scripting 4 04-12-2004 12:35 AM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 03-29-2006
sabercats sabercats is offline
Registered User
  
 

Join Date: Feb 2006
Posts: 66
Remove duplicate

Hi all,
I have a text file fileA.txt
DXRV|02/28/2006 11:36:49.049|SAC||||CDxAcct=2420991350
DXRV|02/28/2006 11:37:06.404|SAC||||CDxAcct=6070970034
DXRV|02/28/2006 11:37:25.740|SAC||||CDxAcct=2420991350
DXRV|02/28/2006 11:38:32.633|SAC||||CDxAcct=6070970034
DXRV|02/28/2006 11:39:40.754|SAC||||CDxAcct=2420991350
ADMX|02/28/2006 12:39:40.754|SAC||||CDxAcct=2420999999
ADMX|02/28/2006 12:40:40.754|SAC||||CDxAcct=2420999999
ADMX|02/28/2006 12:44:40.754|SAC||||CDxAcct=2420999999

if the record have CDxAcct=
and same Name then remove the CDxAcct have duplicate, only keep the new one
Name,date,location,A,B,C,D,CDxAcct=XXXX|CDxAcct=YYYY ....

As result it should be
DXRV,02/28/2006 11:36:49.049,SAC,,,,CDxAcct=2420991350|CDxAcct=6070970034
ADMX,02/28/2006 12:39:40.754,SAC,,,,CDxAcct=2420999999


How do you do that ??
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 09:55 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0