T
thinktwice
findstr /c:test list.txt //set some variable equals to the output of
findstr, how could i do that?
findstr, how could i do that?
findstr /c:test list.txt //set some variable equals to the output of
findstr, how could i do that?
thinktwice said:findstr /c:test list.txt //set some variable equals to the output of
findstr, how could i do that?
Try this:
@echo off
for /F "delims=" %%a in ('findstr/c:test list.txt') do set var=%%a
thanks Pegasus , it works
=============
I should hope so! Thanks for the feedback.
thanks Pegasus , it works
=============
I should hope so! Thanks for the feedback.
btw, is there any advanced usage of findstr to find among the output
conent of a command execution? i know i could redirect the output of
the command to a temporarily file first then use findstr to search in
that file.
=================
In the reply I gave you, you're picking up the
output from findstr.exe without going through
an intermediate temp file.