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]