#!/bin/sh # frep -- filter field repetitions # # Usage: frep [-Ffs] [-l] FIELDS [--] FILES # -F sets field seperator (like in awk) # -l will print the last, not first, occurence of each repeated field. exec awk ' BEGIN { last = 0 delete fields[0] ll = -1 for (i=1; i