File: check_ids

package info (click to toggle)
libmatroska 1.7.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 648 kB
  • sloc: cpp: 3,997; ansic: 272; makefile: 43; sh: 12
file content (18 lines) | stat: -rw-r--r-- 362 bytes parent folder | download | duplicates (11)
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 )