findstr or grep that autodetects chararacter encoding (UTF-16)

后端 未结 7 1228
遥遥无期
遥遥无期 2021-01-04 08:34

I want to do this:

 findstr /s /c:some-symbol *

or the grep equivalent

 grep -R some-symbol *

but I need

7条回答
  •  梦谈多话
    2021-01-04 09:27

    On Windows, you can also use find.exe.

    find /i /n "YourSearchString" *.*
    

    The only problem is this prints file names followed by matches. You may filter them by piping to findstr

    find /i /n "YourSearchString" *.* | findstr /i "YourSearchString"
    

提交回复
热议问题