<s>
The	O
command	B-Application
in	O
the	O
Unix	B-Application
family	O
of	O
computer	B-General_Concept
operating	I-General_Concept
systems	I-General_Concept
is	O
a	O
utility	O
that	O
is	O
used	O
to	O
compare	O
two	O
files	B-Operating_System
for	O
common	O
and	O
distinct	O
lines	O
.	O
</s>
<s>
It	O
has	O
been	O
widely	O
available	O
on	O
Unix-like	B-Operating_System
operating	I-Operating_System
systems	I-Operating_System
since	O
the	O
mid	O
to	O
late	O
1980s	O
.	O
</s>
<s>
Written	O
by	O
Lee	O
E	O
.	O
McMahon	O
,	O
first	O
appeared	O
in	O
Version	B-Operating_System
4	I-Operating_System
Unix	I-Operating_System
.	O
</s>
<s>
The	O
version	O
of	O
bundled	O
in	O
GNU	B-Application
coreutils	I-Application
was	O
written	O
by	O
Richard	O
Stallman	O
and	O
David	O
MacKenzie	O
.	O
</s>
<s>
reads	O
two	O
files	B-Operating_System
as	O
input	O
,	O
regarded	O
as	O
lines	O
of	O
text	O
.	O
</s>
<s>
If	O
the	O
input	O
files	B-Operating_System
contain	O
lines	O
beginning	O
with	O
the	O
separator	O
character	O
,	O
the	O
output	O
columns	O
can	O
become	O
ambiguous	O
.	O
</s>
<s>
For	O
efficiency	O
,	O
standard	O
implementations	O
of	O
expect	O
both	O
input	O
files	B-Operating_System
to	O
be	O
sequenced	O
in	O
the	O
same	O
line	O
collation	O
order	O
,	O
sorted	O
lexically	O
.	O
</s>
<s>
The	O
sort	O
(	O
Unix	B-Application
)	O
command	B-Application
can	O
be	O
used	O
for	O
this	O
purpose	O
.	O
</s>
<s>
The	O
algorithm	O
makes	O
use	O
of	O
the	O
collating	O
sequence	O
of	O
the	O
current	O
locale	B-Device
.	O
</s>
<s>
If	O
the	O
lines	O
in	O
the	O
files	B-Operating_System
are	O
not	O
both	O
collated	O
in	O
accordance	O
with	O
the	O
current	O
locale	B-Device
,	O
the	O
result	O
is	O
undefined	O
.	O
</s>
<s>
Unlike	O
,	O
the	O
return	O
code	O
from	O
has	O
no	O
logical	O
significance	O
concerning	O
the	O
relationship	O
of	O
the	O
two	O
files	B-Operating_System
.	O
</s>
<s>
This	O
shows	O
that	O
both	O
files	B-Operating_System
have	O
one	O
banana	O
,	O
but	O
only	O
bar	O
has	O
a	O
second	O
banana	O
.	O
</s>
<s>
A	O
minor	O
difference	O
between	O
and	O
is	O
that	O
will	O
not	O
try	O
to	O
indicate	O
that	O
a	O
line	O
has	O
"	O
changed	O
"	O
between	O
the	O
two	O
files	B-Operating_System
;	O
lines	O
are	O
either	O
shown	O
in	O
the	O
"	O
from	O
file	O
#1	O
"	O
,	O
"	O
from	O
file	O
#2	O
"	O
,	O
or	O
"	O
in	O
both	O
"	O
columns	O
.	O
</s>
<s>
has	O
command-line	O
options	O
to	O
suppress	O
any	O
of	O
the	O
three	O
columns	O
.	O
</s>
