Peter B. Steiger wrote these words on 07/12/07 15:18 CST: > I'd like to combine the two files without changing the order of the > lines AND without including duplicate lines,
A kludge: start with 3 files where file A and B are the sorted files you want to merge. First, copy B to C (C will be the merged file), then for LINEITEM in `cat A` do grep $LINEITEM B >/dev/null || echo $LINEITEM >>C done Would be expensive if the files were large, therefore a kludge. -- Randy rmlscsi: [bogomips 1003.23] [GNU ld version 2.16.1] [gcc (GCC) 4.0.3] [GNU C Library stable release version 2.3.6] [Linux 2.6.14.3 i686] 15:52:00 up 8:59, 1 user, load average: 0.34, 0.10, 0.03 -- http://linuxfromscratch.org/mailman/listinfo/blfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page
