LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 05-20-2005, 09:26 PM   #1
RajRed
Member
 
Registered: Mar 2005
Posts: 66

Rep: Reputation: 15
where to find dostounix


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

Rep: Reputation: 52
Re: where to find dostounix

Quote:
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:

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

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

Last edited by perfect_circle; 05-21-2005 at 07:34 AM.
 
Old 05-21-2005, 12:09 AM   #3
RajRed
Member
 
Registered: Mar 2005
Posts: 66

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


Reply


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 01: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 04:07 AM
I can find the camera but can't find the images? sneckert Linux - Newbie 2 02-02-2005 09:51 AM
find: . changed during execution of find suse degraffenried13 Linux - General 3 12-12-2004 08:13 PM
linux 'find' to find text files subu_s Programming 2 12-02-2004 03:56 AM


All times are GMT -5. The time now is 08:41 PM.

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