Pipe the output

Discussion in 'Microsoft Windows 2000 CMD Promt' started by Aliyah, Mar 4, 2004.

  1. Aliyah

    Aliyah Guest

    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.
     
    Aliyah, Mar 4, 2004
    #1
    1. Advertisements

  2. "Aliyah" <> wrote in message
    news:3f5301c401cc$6e795ca0$...
    >
    > 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
     
    Paul R. Sadowski, Mar 4, 2004
    #2
    1. Advertisements

  3. "Aliyah" wrote:

    >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
    --
    Greetings
    Matthias________________________________________
    For help on nt commands enter in a cmd window:
    W2K>HH windows.chm::ntcmds.htm XP>HH ntcmds.chm
     
    Matthias Tacke, Mar 4, 2004
    #3
  4. Aliyah

    Aliyah Guest

    thanks all.
    >-----Original Message-----
    >"Aliyah" wrote:
    >
    >>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
    >--
    >Greetings
    >Matthias________________________________________
    >For help on nt commands enter in a cmd window:
    >W2K>HH windows.chm::ntcmds.htm XP>HH ntcmds.chm
    >.
    >
     
    Aliyah, Mar 5, 2004
    #4
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.
Similar Threads
  1. Roger Johnson

    pipe file input into command line command

    Roger Johnson, Aug 1, 2003, in forum: Microsoft Windows 2000 CMD Promt
    Replies:
    0
    Views:
    1,048
    Roger Johnson
    Aug 1, 2003
  2. Phil Robyn

    Re: output the total size of a folder and all sub-folders underneath

    Phil Robyn, Aug 5, 2003, in forum: Microsoft Windows 2000 CMD Promt
    Replies:
    3
    Views:
    1,064
    Dean Wells [MVP]
    Aug 5, 2003
  3. Ricardo M. Urbano - W2K/NT4 MVP

    Re: output the total size of a folder and all sub-folders underneath

    Ricardo M. Urbano - W2K/NT4 MVP, Aug 5, 2003, in forum: Microsoft Windows 2000 CMD Promt
    Replies:
    2
    Views:
    693
    Ritchie
    Aug 6, 2003
  4. Helen

    Output Redirect problem by start command

    Helen, Aug 22, 2003, in forum: Microsoft Windows 2000 CMD Promt
    Replies:
    2
    Views:
    1,885
    Helen
    Aug 25, 2003
  5. BaKaR

    For Function with Pipe Problem.

    BaKaR, Mar 24, 2004, in forum: Microsoft Windows 2000 CMD Promt
    Replies:
    10
    Views:
    891
    Paul R. Sadowski
    Mar 25, 2004
  6. Claus Koch

    Pipe Output into Environment Variable?

    Claus Koch, Aug 11, 2004, in forum: Microsoft Windows 2000 CMD Promt
    Replies:
    1
    Views:
    14,455
    Matthias Tacke
    Aug 11, 2004
  7. Wensi Peng

    oExec.StdOut after pipe Findstr

    Wensi Peng, Jan 7, 2005, in forum: Microsoft Windows 2000 CMD Promt
    Replies:
    1
    Views:
    772
    Matthias Tacke
    Jan 7, 2005
Loading...