How to find files with ^ M from linux using csh

Is there a csh script / command to display all files in the source source tree that have line endings that display as “^ M” in emacs (under Linux).

Thank!

+3
source share
3 answers

Based on my answer to another question :

fgrep -rl `echo -ne '\r'` .
+5
source
find . -type f -exec grep $'\r' {} +

$'\r'probably bash needs to function correctly.

0
source
find . -type f -print | xargs grep 'cntl-M$'

where cntl-M is entered by the first input of cntl-V

0
source

Source: https://habr.com/ru/post/1698959/


All Articles