Timeline for Remove a carriage return with sed
Current License: CC BY-SA 4.0
6 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Apr 24, 2024 at 23:56 | comment | added | Fjor |
It depends only of the line endings used in the specific OS: \n is different for Windows, Linux and MacOS (I think \n is \r\l -CR,LF- in Windows, \l -LF- in Linux and \r -CR- in MacOS), so we must use the literal representation of the undesired char in tr -d to get rid of it [CR and LF are the ASCII chars Carriage Return (decimal 13) and Line Feed (decimal 10)].
|
|
| Dec 5, 2022 at 0:36 | comment | added | CloudEmber | The difference is just '\n' instead of '\r' | |
| Nov 26, 2022 at 16:32 | comment | added | doneal24 |
I don't see how this is different from @Fjor's answer other than you're using cat instead of reading directly from stdin. Qualifies for the useless use of cat. Also here.
|
|
| Nov 26, 2022 at 6:40 | review | Late answers | |||
| Nov 26, 2022 at 16:32 | |||||
| S Nov 26, 2022 at 6:24 | review | First answers | |||
| Nov 28, 2022 at 6:17 | |||||
| S Nov 26, 2022 at 6:24 | history | answered | CloudEmber | CC BY-SA 4.0 |