File: check_ids

package info (click to toggle)
libmatroska 0.8.0-2
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 1,072 kB
  • ctags: 3,018
  • sloc: cpp: 8,470; makefile: 353; ansic: 157; sh: 14
file content (18 lines) | stat: -rwxr-xr-x 374 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh

# A small script that looks for duplicate EBML IDs in all of libmatroska's
# source files.

echo 'Duplicate IDs:'
grep -h '^EbmlId.*_TheId' ../../src/*cpp | \
  sed -e 's/TheId/TheId /' | \
  awk '{ print $3 }' | \
  sed -e 's/(//' -e 's/,//' | \
  sort  | \
  uniq -d | \
( while read id ; do
    echo ''
    echo ${id}:
    grep -i $id ../../src/*cpp
  done )