FINDSTR questions

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Mike (Mike_at_discussions.microsoft.com)
Date: 10/13/04


Date: Wed, 13 Oct 2004 10:23:03 -0700

Hello,

I am looking for a command I can run from my W2K Pro or XP workstations that
will allow me to essentially grep for a string on a line, output that line in
it's entirety to the console/file, and hopefully also prefixing the filename
or something - so I can know in what files the output refers to & found the
data.

Looked so far in vain for a good grep command or GUI that will do this, but
came across FINDSTR. It seems to have most of what I need, but when I use
the /x switch I get no output.

Here is what I'm doing:
findstr /x ".*Text I'm Searching For.*" *.log

(I'm in the current directory with all the .log files I'm searching for).

Anyone a pro at this command?

Thanks,

Mike



Relevant Pages

  • FINDSTR question
    ... Looked so far in vain for a good grep command or GUI that will do this, ... (I'm in the current directory with all the .log files I'm searching for). ... Anyone a pro at this command? ...
    (microsoft.public.win2000.general)
  • Re: grep within files older than 3 days
    ... The find command you are doing won't look at the contents of the log ... think you will need to use the grep comamnd to search within each log ... only updated with completion times when the particular program is run, ... Find all log files NOT older than 3 days ...
    (comp.unix.aix)
  • FINDSTR question
    ... Looked so far in vain for a good grep command or GUI that will do this, ... (I'm in the current directory with all the .log files I'm searching for). ... Anyone a pro at this command? ...
    (microsoft.public.windowsxp.help_and_support)
  • Re: FINDSTR question
    ... > will allow me to essentially grep for a string on a line, ... > Looked so far in vain for a good grep command or GUI that will do this, ... > Anyone a pro at this command? ... -- torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway Administration scripting examples and an ONLINE version of the 1328 page Scripting Guide: ...
    (microsoft.public.win2000.general)
  • Re: FINDSTR question
    ... > will allow me to essentially grep for a string on a line, ... > Looked so far in vain for a good grep command or GUI that will do this, ... > Anyone a pro at this command? ... I have had similar issues with "findstr" on xp and 2k. ...
    (microsoft.public.win2000.general)