Re: parsing
From: Al Dunbar [MS-MVP] (alan-no-drub-spam_at_hotmail.com)
Date: 07/30/04
- Next message: William Hymen: "Installing Terminal services on Win2k Pro"
- Previous message: Al Dunbar [MS-MVP]: "Re: "DOS" Extension feature .."
- In reply to: David Trimboli: "Re: parsing"
- Next in thread: Québec: "Re: parsing"
- Reply: Québec: "Re: parsing"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 29 Jul 2004 19:21:59 -0600
"David Trimboli" <trimboli@cshl.edu> wrote in message
news:ejPR5tadEHA.2664@TK2MSFTNGP09.phx.gbl...
> "Québec" <Once@WasEno.ugh> wrote in message
> news:OATLPPYdEHA.2696@TK2MSFTNGP09.phx.gbl...
> > Hi gurus,
> >
> > I have a line of code here that works so so but I would like it to write
> the
> > name of the file in wich it found the word.
> > It search trough all files in a directory.
> >
> > type *.c| findstr assert >>Out.txt
>
> I find that when using findstr directly (without piping another command
into
> it), and when the file parameter includes a wildcard, the command will
tell
> me which file the match comes from.
>
> findstr assert *.c >>Out.txt
>
> This will produce a text file with a series of lines of this format:
>
> <filename>:<line containing match>
Even good old find works well in this manner (for simple searches, at
least):
find /i "assert" *.c >>Out.txt
Try both, and pick the one whose output format you find most convenient.
/Al
- Next message: William Hymen: "Installing Terminal services on Win2k Pro"
- Previous message: Al Dunbar [MS-MVP]: "Re: "DOS" Extension feature .."
- In reply to: David Trimboli: "Re: parsing"
- Next in thread: Québec: "Re: parsing"
- Reply: Québec: "Re: parsing"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|