rpirena/strato4/STRATO4.awk
stephan 275eaff08f strato4
git-svn-id: svn+ssh://asterix.ieap.uni-kiel.de/home/subversion/stephan/solo/eda/cospi/host@9331 bc5caf13-1734-44f8-af43-603852e9ee25
2025-03-19 19:50:00 +00:00

30 lines
439 B
Awk
Executable file

#! /usr/bin/gawk -i
BEGIN {
FS=";"
}
/^Uptime/ {
for(i = 1; i <= NF; i++) {
patsplit($i, HH, /[^[(]+[^ [(]/)
H = HH[1]
HEAD[H] = i
HEADI[i] = H
print "Column", i, "\"" H "\"" > "/dev/stderr"
}
NHEAD = NF
}
function ifV() {
if (!NF || NF != NHEAD) return 0
for (H in HEAD) VV[H] = $(HEAD[H])
return 1
}
function ifH(H) {
if (!NF || NF != NHEAD) return 0
C = HEAD[H]
V = $(C)
return 1
}