On 7/12/07, Peter B. Steiger <[EMAIL PROTECTED]> wrote:
> Suppose file A has:
> AAA
> BBB
> DUPLICATE
> CCC
>
> and file B has
> 111
> DUPLICATE
> 222
> 333
>
> I'd like to combine the two files without changing the order of the
> lines AND without including duplicate lines, so the end result might be
> something like this:
> 111
> DUPLICATE
> 222
> 333
> AAA
> BBB
> CCC

comm does something like that. This sorta works, where 1 and 2 are files.

$ comm 1 2 | sed 's/^\t*//'
111
AAA
BBB
DUPLICATE
222
333
CCC

--
Dan
-- 
http://linuxfromscratch.org/mailman/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to