Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Finding newlines

1 view
Skip to first unread message

.bat

unread,
Jul 3, 2002, 3:18:57 PM7/3/02
to
Is there any way to find text, a newline, then more text from a batch
file? For example:

(text.txt)
This is line one.
This is line two.

(batch.bat)
find "This is line one.<newline>This is line two" text.txt

...So it would output:
This is line one.
This is line two.

Note: The text in text.txt won't always be in the same line position.

Thanks.

Phil Robyn

unread,
Jul 3, 2002, 4:30:33 PM7/3/02
to

C:\cmd>type c:\temp\lines1and2.txt
some text
some more text
still some more text


This is line one.
This is line two.

and still some more text.

C:\cmd>findstr "This is line one.\rThis is line two." c:\temp\lines1and2.txt


This is line one.
This is line two.

--
t o s e n d e - m a i l u s e ' R e p l y - T o '
o r u n z i p m y ' F r o m ' a d d r e s s ....

0 new messages