Talk About Network



Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > MSDOS Programmer > Re: Extract Rec...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 5 Topic 477 of 494
Post > Topic >>

Re: Extract Records with DOS

by "Jim Langston" <tazmaster@[EMAIL PROTECTED] > Jan 24, 2008 at 04:38 PM

samuel.k.silver@[EMAIL PROTECTED]
 wrote:
> I have a large file with  millions of records and I have to clean it
> up and delete all lines that do not start with certain string (let's
> say XYZ).
> Can this be done in DOS?
> Any suggestions on what approach/tools I can take here.

It should be doable with a simple find.

find "XYZ" myfile.txt > myfile2.txt

this will produce myfile2.txt which contains only those lines containing
the 
text XYZ

You may get extra lines, however, if XYZ is contained somewhere else in a 
line and not the front.  If it is unique enough you won't get as many
false 
hits.

-- 
Jim Langston
tazmaster@[EMAIL PROTECTED]





 5 Posts in Topic:
Extract Records with DOS
samuel.k.silver@[EMAIL PR  2008-01-24 14:51:48 
Re: Extract Records with DOS
"Jim Langston"   2008-01-24 16:38:58 
Re: Extract Records with DOS
ArarghMail801NOSPAM@[EMAI  2008-01-24 20:54:27 
Re: Extract Records with DOS
"Todd Vargo" &l  2008-01-25 05:15:10 
Re: Extract Records with DOS
ArarghMail801NOSPAM@[EMAI  2008-01-25 01:54:18 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat May 17 5:41:53 CDT 2008.