Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 05-20-2005, 08:26 PM   #1
Registered: Mar 2005
Posts: 66

Rep: Reputation: 15
where to find dostounix

Where I can find dostounix program or command?
Old 05-20-2005, 09:16 PM   #2
Senior Member
Registered: Oct 2004
Location: Athens, Greece
Distribution: Slackware, arch
Posts: 1,783

Rep: Reputation: 52
Re: where to find dostounix

Originally posted by RajRed
Where I can find dostounix program or command?
You mean a command that will edit a file and replace all the windows new-line sequence of characters (\r\n) with a unix new-line character (\n)
You should probably seach it as dos2unix, in google.

But I preffer the do-it-yourself solution:

TO remove all the \r characters from a file
you may use bash:

cat <dos_file> | tr -d "\r" > <unix_file>
or just open the file in vi and type:
to replace \r\n with \n

or use perl, something like:
perl -pe 's/\015\012/\n/g'
I think (not a perl fan)

Last edited by perfect_circle; 05-21-2005 at 06:34 AM.
Old 05-20-2005, 11:09 PM   #3
Registered: Mar 2005
Posts: 66

Original Poster
Rep: Reputation: 15
Thank you. I should have checked "dos2unix" instead of "dostounix".


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
linux find to find files with multiple patterns subu_s Programming 6 12-15-2010 12:15 AM
Can`t find C-compiler in Debian ,or at least can`t find one that can make executables hemmelig Linux - Software 4 05-26-2008 03:07 AM
I can find the camera but can't find the images? sneckert Linux - Newbie 2 02-02-2005 08:51 AM
find: . changed during execution of find suse degraffenried13 Linux - General 3 12-12-2004 07:13 PM
linux 'find' to find text files subu_s Programming 2 12-02-2004 02:56 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:21 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration