batch file to search in txt file for string and get the full line off the string -


i want batch file search in txt file string , full line of it

this txt file input

1:how you

3:im fine

2:yeah

     example      @echo off      set string=3:      echo full line off string %fullline%      pause 

here batch file calls findstr directly, , within loop add text line. if want found text delete line beginning for.

@echo off  set findtext="blah" set findfile="test.txt"  findstr %findtext% %findfile%  /f "delims=" %%a in ('findstr %findtext% %findfile%') echo full line of string %%a 

credits


Comments

Popular posts from this blog

Python Kivy ListView: How to delete selected ListItemButton? -

asp.net mvc 4 - A specified Include path is not valid. The EntityType '' does not declare a navigation property with the name '' -