~ubuntu-branches/debian/sid/varnish/sid

« back to all changes in this revision

Viewing changes to bin/varnishncsa/flint.sh

  • Committer: Bazaar Package Importer
  • Author(s): Stig Sandbeck Mathisen
  • Date: 2011-03-21 10:16:07 UTC
  • mfrom: (24.1.2 experimental)
  • Revision ID: james.westby@ubuntu.com-20110321101607-528fzl583fqanas5
Tags: 2.1.5-2
ReleaseĀ forĀ unstable

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
 
 
3
T=/tmp/_$$
 
4
flexelint \
 
5
        -I/usr/include \
 
6
        -I. \
 
7
        -I../../include \
 
8
        flint.lnt \
 
9
        *.c > $T 2>&1
 
10
 
 
11
for t in Error Warning Info
 
12
do
 
13
        sed -n "/$t [0-9][0-9][0-9]:/s/.*\($t [0-9][0-9][0-9]\).*/\1/p" $T
 
14
done | awk '
 
15
$2 == 830       { next }
 
16
$2 == 831       { next }
 
17
        {
 
18
        i=$2"_"$1
 
19
        h[i]++
 
20
        n++
 
21
        }
 
22
END     {
 
23
        printf "%5d %s\n", n, "Total"
 
24
        for (i in h)
 
25
                printf "%5d %s\n", h[i], i
 
26
        }
 
27
' | sort -rn
 
28
 
 
29
cat $T