1#!/bin/sh 2NM="$1" 3FILE="$2" 4OUTPUT="$3" 5 6"$NM" -g "$FILE" 2>/dev/null | grep ' [A-TVX-Z] ' | grep -v '__x86' | sort | uniq -d > "$OUTPUT" 7if [ -e "$OUTPUT" ] && [ -s "$OUTPUT" ]; then 8 echo "Duplicate names in ${FILE}" 9 cat "$OUTPUT" 10 exit 1 11fi 12exit 0 13