-1

I have a directory with *.txt files.

How can I list the txt filenames that are still having non-unix eol's? So windows and mac eols.

1
2

"mac eols" (carriage returns) are rare since around 2000 (i.e., since OSX was first released). For finding files with CRLF endings, the file utility is helpful, since it is looking at more than grep might.

Further reading

0

You could use "file" command. When a file is using CRLF EOL, "file" returned

filename: ASCII text, with CRLF line terminators

for UNIX EOL, it returns:

filename: ASCII text

Not the answer you're looking for? Browse other questions tagged or ask your own question.