How to fetch exact string from a text file
here is me requirement.
I have one text file and I need to get exact specified string from that file
C:>type small.txt | find "small2"
small2
small22
small20
C:>type small.txt small2
small22
small20
C:>type small.t开发者_StackOverflow中文版xt | find "small2" small2
small22
small20
C:\
Here it is giving all the words instead of only "small2"
echo small2
Will give you the same result
Ok.. I got the solution
C:\>findstr "\<small20\>" small.txt
small20
C:\>
精彩评论