Convert DOS line breaks to Unix line breaks

Home -> UNIX

19737 views

From the computer of: skreuzer (6 recipes)
Created: Oct 18, 2003


5 comments:
View all comments

Add a comment

Add to:
Add to stumbleuponAdd to del.icio.usDigg itAdd to FURL

This one liner will convert a file with DOS line breaks to a file with Unix line breaks

tr -d '\15\32' < dos-format-file > unix-friendly-file

Subscribe to the Tech-Recipes Newsletter

You can get tips like this delivered in your email every week!

Enter your Email

We will never, ever sell your email address or spam you.




5 Recipe comments: View comments

Convert DOS line breaks to Unix line breaks by Anonymous
Doesn't work! by Anonymous
sed by Anonymous
Re: Doesn't work! by progoth
Re: Convert DOS line breaks to Unix line breaks by Opiario



Related recipes:

  Convert Macintosh line breaks to Unix line breaks
  Convert Unix lines breaks to Macintosh line breaks
  View a file with line numbers
  Find help with man pages
  Remove ^M characters at end of lines in vi
  Solaris: create ssh keys for quick server logins
  Show line numbers in vi or vim
  Place and manage tasks or jobs in the background from the comand line
  Unix/Linux: Easily find or search files or directories
  Move or jump to specific lines in vi

 

Sponsored links

 

Login

Nickname

Password

Don't have an account yet? You can create one. As a registered user you have some advantages like theme manager, comments configuration and post comments with your name.