[lug] parsing between two lists

Tkil tkil at scrye.com
Wed Mar 27 12:27:26 MST 2002


>>>>> "Rob" == Rob Riggs <Riggs> writes:

Rob> Unique in list A: diff -u listA listB | grep ^- | sed 's/^.//g'
Rob> Unique in list B: diff -u listA listB | grep ^+ | sed 's/^.//g'
Rob> Common to both: diff -u listA listB | grep "^ " | sed 's/^.//g'

cute optimization is to diff to a temp file first, then yank out the
bits you want later.

also, "cut" might be faster than "sed".

yours in nugget polishing,
t.



More information about the LUG mailing list