30 lines
754 B
Awk
30 lines
754 B
Awk
|
#!/bin/awk
|
||
|
|
||
|
function ltrim(s) { sub(/^[ \t\r\n]+/, "", s); return s }
|
||
|
function rtrim(s) { sub(/[ \t\r\n]+$/, "", s); return s }
|
||
|
function trim(s) { ; return rtrim(ltrim(s)); }
|
||
|
|
||
|
function validBool(s) {
|
||
|
if (s == "ja" || s == "nein") {
|
||
|
return "1";
|
||
|
} else {
|
||
|
return "0";
|
||
|
}
|
||
|
}
|
||
|
|
||
|
{
|
||
|
if (FNR > 1) {
|
||
|
if ( validBool($4) == "0" ) { next; }
|
||
|
if ( validBool($9) == "0" ) { next; }
|
||
|
if ( validBool($10) == "0" ) { next; }
|
||
|
if ( validBool($15) == "0" ) { next; }
|
||
|
if ( validBool($16) == "0" ) { next; }
|
||
|
if ( validBool($17) == "0" ) { next; }
|
||
|
if ( validBool($19) == "0" ) { next; }
|
||
|
if ( validBool($21) == "0" ) { next; }
|
||
|
if ( validBool($22) == "0" ) { next; }
|
||
|
if ( validBool($23) == "0" ) { next; }
|
||
|
}
|
||
|
print trim($0)
|
||
|
}
|