File: check_ids

package info (click to toggle)
libmatroska 1.4.1-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie-kfreebsd
  • size: 884 kB
  • sloc: cpp: 4,127; makefile: 318; ansic: 289; sh: 14
file content (18 lines) | stat: -rw-r--r-- 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 )