Pipe the output

A

Aliyah

Hi guys,

Need help. I have a list of files (post.txt) to be search
in temporary.log. Any ideas how can I pipe the output or
copied the output in the textfile. I created this
batchfile but it didn't work. I think missed something
please help.

for /f "tokens=*" %%a in (e:\temp\post.txt) do findstr /i %
%a e:\temp\temporary.log

thanks in advance.
 
P

Paul R. Sadowski

Aliyah said:
for /f "tokens=*" %%a in (e:\temp\post.txt) do findstr /i %
%a e:\temp\temporary.log

if EXIST e:\temp\myoutput.txt del e:\temp\myoutput.txt
for /f "tokens=*" %%a in (e:\temp\post.txt) do findstr /i %%a
e:\temp\temporary.log >> e:\temp\myoutput.txt
 
M

Matthias Tacke

Aliyah said:
Hi guys,

Need help. I have a list of files (post.txt) to be search
in temporary.log. Any ideas how can I pipe the output or
copied the output in the textfile. I created this
batchfile but it didn't work. I think missed something
please help.

for /f "tokens=*" %%a in (e:\temp\post.txt) do findstr /i %
%a e:\temp\temporary.log

thanks in advance.

No need to loop with for. Use the /G: option of findstr. This should be
much faster and give a sorted result.

findstr /G:e:\temp\post.txt e:\temptemporaray.log

HTH
 
A

Aliyah

thanks all.
-----Original Message-----


No need to loop with for. Use the /G: option of findstr. This should be
much faster and give a sorted result.

findstr /G:e:\temp\post.txt e:\temptemporaray.log

HTH
--
Greetings
Matthias________________________________________
For help on nt commands enter in a cmd window:
W2K>HH windows.chm::ntcmds.htm XP>HH ntcmds.chm
.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top