开发者

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:\>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜