Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

How to get command result to a variable

$
0
0

Hello,

I have the following commands to get the number of lines that contains "here is the line". However the variable linecount is always null for me.

Any suggestion?

Thanks!

set linecount=(typet test.txt | find /c "here is the line')

echo linecount=%linecount


Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>