#!/bin/bash # /usr/local/bin/permutediff # http://crystalfaeries.net/posix/bin/permutediff # celeste:crystalfaery 2016-07-25 22:56:31+00:00 # compute differences between the files given as arguments while [ $# -ge 2 ] do primary="${1}" shift $0 $@ # premute remaining arguments while [ $# -ge 1 ] do # permute versus primary argument secondary="${1}" shift echo "======= diff ${primary} ${secondary} =======" diff ${primary} ${secondary} done done