#!/bin/bash ## form the set-difference of 2 files; Eugene Reimer 2010-04; ## for files that are set-like / uniquified, but need not be sorted (for sorted files using join or comm may be slightly faster): ## see also: SetUnion SetIntersection; ## ## This and other useful one-liners are found in: http://www.pixelbeat.org/cmdline.html ## he calls it SetDifference, and has $1, $2 reversed to my way of thinking; ## ==my ListSubtract* scripts could be adapted to this method==??== sort "$1" "$2" "$2" |uniq -u