Brian Silverman | 846f084 | 2013-12-02 18:31:32 -0800 | [diff] [blame] | 1 | #!/bin/bash |
2 | |||||
3 | if [[ $# -lt 1 ]]; then | ||||
4 | find $(dirname $0) \( -name '*.sch' -or -name '*.sym' \) -exec $0 {} \; | ||||
5 | exit $? | ||||
6 | fi | ||||
7 | |||||
8 | FILE=$1 | ||||
9 | |||||
10 | DUPLICATED=$(grep -F 'refdes=' "${FILE}" | sort | uniq -d) | ||||
11 | |||||
12 | if [[ -n ${DUPLICATED} ]]; then | ||||
13 | echo Duplicated lines in ${FILE}: | ||||
14 | echo ${DUPLICATED} | ||||
15 | fi |