<s>
(	O
sometimes	O
named	O
or	O
)	O
is	O
a	O
tool	O
to	O
convert	O
line	O
breaks	O
in	O
a	O
text	B-General_Concept
file	I-General_Concept
from	O
Unix	B-Application
format	O
(	O
Line	O
feed	O
)	O
to	O
DOS	B-Device
format	O
(	O
carriage	O
return	O
+	O
Line	O
feed	O
)	O
and	O
vice	O
versa	O
.	O
</s>
<s>
When	O
invoked	O
as	O
the	O
program	O
will	O
convert	O
a	O
Unix	B-Application
text	B-General_Concept
file	I-General_Concept
to	O
DOS	B-Device
format	O
,	O
when	O
invoked	O
as	O
it	O
will	O
convert	O
a	O
DOS	B-Device
text	B-General_Concept
file	I-General_Concept
to	O
UNIX	B-Application
format	O
.	O
</s>
<s>
Unix2dos	B-Device
and	O
dos2unix	B-Device
are	O
not	O
part	O
of	O
the	O
Unix	B-Application
standard	O
.	O
</s>
<s>
Commercial	O
Unixes	B-Application
usually	O
come	O
with	O
their	O
own	O
implementation	O
of	O
unix2dos/dos2unix	O
,	O
like	O
SunOS/Solaris	O
'	O
s	O
dos2unix/unix2dos	O
,	O
HP-UX	O
'	O
s	O
dos2ux/ux2dos	O
and	O
Irix	O
's	O
to_unix/to_dos	O
.	O
</s>
<s>
There	O
exist	O
many	O
open	O
source	O
alternatives	O
with	O
different	O
command	B-Application
names	O
and	O
options	O
like	O
dos2unix/unix2dos	O
,	O
d2u/u2d	O
,	O
,	O
endlines	O
,	O
flip	O
.	O
</s>
<s>
The	O
multi-call	O
binary	O
busybox	B-Application
includes	O
an	O
implementation	O
of	O
unix2dos/dos2unix	O
.	O
</s>
<s>
See	O
the	O
manual	B-Protocol
page	I-Protocol
of	O
the	O
respective	O
commands	O
.	O
</s>
<s>
For	O
the	O
opposite	O
conversion	O
(	O
)	O
it	O
is	O
possible	O
to	O
use	O
,	O
for	O
example	O
,	O
the	O
utility	O
tr	B-Application
with	O
the	O
flag	O
to	O
remove	O
the	O
carriage	O
return	O
characters	O
:	O
</s>
<s>
Note	O
:	O
The	O
above	O
method	O
assumes	O
there	O
are	O
only	O
DOS	B-Device
line	O
breaks	O
in	O
the	O
input	O
file	O
.	O
</s>
<s>
An	O
alternative	O
to	O
the	O
dos2unix	B-Device
conversion	O
is	O
possible	O
by	O
using	O
the	O
command	B-Application
that	O
is	O
available	O
on	O
Linux	B-Application
and	O
other	O
Unix-like	B-Operating_System
operating	I-Operating_System
systems	I-Operating_System
,	O
including	O
Mac	O
OS	O
X	O
.	O
</s>
<s>
In	O
the	O
following	O
case	O
,	O
InFile	O
contains	O
the	O
undesired	O
DOS	B-Device
( ^M	O
)	O
line	O
endings	O
.	O
</s>
<s>
After	O
execution	O
,	O
OutFile	O
is	O
either	O
created	O
or	O
replaced	O
,	O
and	O
contains	O
UNIX	B-Application
line	O
endings	O
.	O
</s>
