#!/bin/bash ## form the intersection 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: SetIntersection SetSubtract; ## ## This and other useful one-liners are found in: http://www.pixelbeat.org/cmdline.html sort "$1" "$2" |uniq