4.2BSD/usr/man/man0/comm.sed

:x
N
/\( [^ ]*\)\n.*\1$/{
	s/\n.*//
	bx
}
P
s/.*\n//
bx