Timeline for How to find out line-endings in a text file?
Current License: CC BY-SA 3.0
11 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Oct 17, 2023 at 12:49 | comment | added | Paolo Biavati | This is very usefull , I had a file with CRLF (copied from windows to a Docker container unix) and unix did not recognise it The error was "no such file or directory" | |
Nov 17, 2022 at 14:17 | comment | added | gluttony |
This actually works but I prefer the file testfile.txt answer that does not write all the file, easier to check on several files, for instance I had a script among others that has DOS/Windows ending and was not executed properly, I then simply checked all others to see if they have issue with file $(find . -name *.sh) .
|
|
Dec 25, 2021 at 20:14 | comment | added | Timo |
cat -e to show line endings works on debian 10 buster with wsl
|
|
Mar 25, 2021 at 18:29 | comment | added | xmnboy |
I find that I have to use cat -vE <filename> to see the \r characters (displayed as ^M ) and the \n characters (displayed as a $ ). This is using GNU cat on Linux.
|
|
Jan 20, 2021 at 17:54 | comment | added | Bob Stein |
@TomM no. The caret in ^M$ inverts this into an easter egg for Microsoft cultists.
|
|
Mar 15, 2019 at 0:18 | comment | added | Zeus | Does not work with Solaris, but man says tthat it should have worked | |
Feb 21, 2018 at 13:25 | comment | added | Tom M | is the display of M$ an easteregg/windows bashing? | |
Aug 18, 2016 at 17:23 | comment | added | dlsso |
Also works on OSX. Good solution. Simple and worked for me while the accepted answer did not. (Note: was not a .txt file)
|
|
Apr 6, 2016 at 0:47 | history | edited | Bennett McElwee | CC BY-SA 3.0 |
Clarify effects of -e option
|
Dec 20, 2015 at 1:08 | review | Late answers | |||
Dec 20, 2015 at 1:09 | |||||
Dec 20, 2015 at 0:49 | history | answered | Alex Shelemin | CC BY-SA 3.0 |