Piping to findstr's input, dos prompt
Posted
by Gauthier
on Stack Overflow
See other posts from Stack Overflow
or by Gauthier
Published on 2010-06-17T13:39:52Z
Indexed on
2010/06/17
13:43 UTC
Read the original article
Hit count: 322
I have a text file with a list of macro names (one per line). My final goal is to get a print of how many times the macro's name appears in the files of the current directory.
The macro's names are in C:\temp\macros.txt
.
type C:\temp\macros.txt
in the dos prompt prints the list alright.
Now I want to pipe that output to the standard input of findstr
.
type C:\temp\macros.txt | findstr *.ss
(ss is the file type where I am looking for the macro names).
This does not seem to work, I get no result (very fast, it does not seem to try at all). findstr <the first row of the macro list> *.ss
does work.
I also tried findstr *.ss < c:\temp\macros.txt
with no success.
© Stack Overflow or respective owner