How do you search for files containing DOS line endings (CRLF) with grep on Linux?

后端 未结 9 1243
栀梦
栀梦 2020-11-30 17:24

I want to search for files containing DOS line endings with grep on Linux. Something like this:

grep -IUr --color \'\\         


        
9条回答
  •  星月不相逢
    2020-11-30 18:11

    If your version of grep supports -P (--perl-regexp) option, then

    grep -lUP '\r$'
    

    could be used.

提交回复
热议问题