File: check_ids

package info (click to toggle)
libmatroska 0.7.5-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 1,000 kB
  • ctags: 2,919
  • sloc: cpp: 8,033; makefile: 323; ansic: 154; 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 )