1*c54f35caSApple OSS Distributions#!/bin/sh 2*c54f35caSApple OSS Distributions 3*c54f35caSApple OSS Distributionsset -e 4*c54f35caSApple OSS Distributions 5*c54f35caSApple OSS Distributionsif [ $# -lt 2 ]; then 6*c54f35caSApple OSS Distributions echo "Usage: $0 output.exp input1 [input2 ... ]" 1>&2 7*c54f35caSApple OSS Distributions exit 1 8*c54f35caSApple OSS Distributionsfi 9*c54f35caSApple OSS Distributions 10*c54f35caSApple OSS DistributionsOUTPUT="$1" 11*c54f35caSApple OSS Distributionsshift 12*c54f35caSApple OSS Distributions 13*c54f35caSApple OSS Distributions# Note: we used to export both sides of the alias since forever 14*c54f35caSApple OSS Distributions# for now keep doing this 15*c54f35caSApple OSS Distributions 16*c54f35caSApple OSS Distributions( grep -h -v ":" "$@"; grep -h ":" "$@" | awk -F: '{print $1; print $2}' ) | sort -u > "$OUTPUT" 17*c54f35caSApple OSS Distributions 18*c54f35caSApple OSS Distributionsexit 0 19