mirror of
https://github.com/GnoConsortium/gno.git
synced 2024-09-13 12:55:53 +00:00
ddb82cb2e0
Maybe someday I'll become adept at using cvs...
20 lines
334 B
Awk
20 lines
334 B
Awk
# Read values into an array
|
|
|
|
$1 == "REMOVE" { delete value[$2]; next }
|
|
|
|
$1 == "RESET" {delete value; next}
|
|
|
|
$1 == "SKIP" {nextfile}
|
|
|
|
$1 == "PRINT" {printarray(value); next}
|
|
|
|
{ value[$1] = $2 }
|
|
|
|
END { printarray(value) }
|
|
|
|
function printarray(A, key) {
|
|
print "Values in array";
|
|
for (key in A) print " ",key,A[key];
|
|
print " ";
|
|
}
|