Windows Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOperating SystemsWindows Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old November 3rd, 2003, 03:27 PM
stanleypane's Avatar
stanleypane stanleypane is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Location: Baltimore, MD
Posts: 208 stanleypane User rank is Sergeant (500 - 2000 Reputation Level)stanleypane User rank is Sergeant (500 - 2000 Reputation Level)stanleypane User rank is Sergeant (500 - 2000 Reputation Level)stanleypane User rank is Sergeant (500 - 2000 Reputation Level)stanleypane User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 4 Days 7 h 4 m 19 sec
Reputation Power: 21
Comparing text strings in Windows 2000

I have a quick question perhaps one of you would be able to help out with.

I am trying to find a way to compare lines in a text file and extract specific lines of text based on the findings. I would like to be able to do this from the command line and set up a batch file to do this automatically for me. The operating system I am using is Windows 2000.

For example, lets say I have a file that is dumped onto a machine every hour. It is a text file that is pipe delimited and contains various bits of information for a customer database. The file is formatted as follows:

OrderNumber|CustomerNumber|PhoneNumber|Address|Etc.|Etc.|Etc.


Every line contains a new order number with customer information. What I would like to do is compare customer numbers between lines and pull out any duplicate customer numbers.

In other words, if two lines in this file have the same customer number, I want to pull one of those lines out and place the information in a seperate file. I want it to happen automatically, without the need for a GUI application. I can do the replacements using a port of Sed for Windows, I just can't figure out how to compare individual lines for diplicate data.

Sorry for the lengthy description, just want to make sure I supply everyone with the right amount of info.

Thanks!

Reply With Quote
Reply

Viewing: Dev Shed ForumsOperating SystemsWindows Help > Comparing text strings in Windows 2000


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
Stay green...Green IT