git-svn-id: svn+ssh://asterix.ieap.uni-kiel.de/home/subversion/stephan/solo/eda/cospi/host@6123 bc5caf13-1734-44f8-af43-603852e9ee25
39 lines
503 B
Awk
Executable file
39 lines
503 B
Awk
Executable file
#! /usr/bin/awk -f
|
|
|
|
BEGIN {
|
|
n = 0
|
|
m = 0
|
|
gsm_min_dt = 50000
|
|
gsm_max_n = 3
|
|
}
|
|
|
|
/^EI/ {
|
|
dt = $5
|
|
if (dt >= gsm_min_dt) {
|
|
if (n <= gsm_max_n) for (i=0; i<m; i++) print L[i];
|
|
L[0] = $0
|
|
m = 1;
|
|
n = 1;
|
|
} else {
|
|
if (n < gsm_max_n) {
|
|
L[m] = $0
|
|
m++
|
|
} else {
|
|
for (i=0; i<m; i++) if (L[i] !~ /^EI/) print L[i]
|
|
m = 0;
|
|
}
|
|
n ++
|
|
}
|
|
next
|
|
}
|
|
|
|
{
|
|
if (!m) {
|
|
print
|
|
} else {
|
|
L[m] = $0
|
|
m ++
|
|
}
|
|
}
|
|
|
|
END { for (i=0; i<m; i++) if (L[i] !~ /^EI/) print L[i] }
|