opm-simulators/tests/getprop.awk
Arne Morten Kvarving 4a3a47c764 changed: no need to manually specify test data in update script
rather specify it as properties on the tests themself and extract
using some awk-ing.
2023-06-08 10:33:36 +02:00

11 lines
187 B
Awk

$1 ~ search {
for (i = 3; i <= NF; ++i) {
if ($i == prop) {
val = $(i + 1)
gsub(/"/, "", val)
print val
exit
}
}
}