Tuesday, 31 July 2018

carriage return - Convert CRLF's to line feeds on Linux


What's the best way to convert CRLF's to line feeds in files on Linux?


I've seen sed commands, but is there anything simpler?



Answer



Use this command:


fromdos yourtextfile

The other way around:


todos yourtextfile

These commands are found in the tofrodos package (on most recent distributions), which also provides the two wrappers unix2dos and dos2unix that mimic the old unix tools of the same name.


No comments:

Post a Comment

Where does Skype save my contact's avatars in Linux?

I'm using Skype on Linux. Where can I find images cached by skype of my contact's avatars? Answer I wanted to get those Skype avat...