PDA

View Full Version : Linux format and MS format question


Jeremykai
10-17-05, 06:04 AM
Dear Sir/Madam

I am sorry to ask anyone know how to copy Linux bug report format to MS format due to my purpose is want to report the Linux question while building
the Linux system.




Jeremy

Thunderbird
10-17-05, 06:58 AM
In short the issue is that on Unix lines end with a 'linefeed'-character while on windows they end with both a 'carriage return' and a 'linefeed'. Most distributions ship with a tool called dos2unix / unix2dos which can do the conversion in other cases you can do it using a 'good' text editor. If you can't find one which can do it you can for instance open the text file using lets say openoffice and save it as a rtf or doc file and then the lines are correct for sure.

Jeremykai
10-19-05, 11:34 AM
Thank you tell me about the unix2dos & dos2unix.However I got the question
due to I have been try to typing the Commands in the Linux.Why doesn't respose the and action. My Linux version is Debian. Kernel 2.4.27





Jeremy

wnd
10-19-05, 02:24 PM
In case you just want to add/remove carriage return, you can use the following instead of dos2unix...

Add carriage return (from UNIX to DOS):
sed -ie "s/$/\r/" file

Remove carriage return (from DOS to UNIX)
sed -ie "s/\r//" file

Answer based on Thunderbird's reply -- I didn't understand the question.