diff options
| author | wukong <wukong@longaeva> | 2026-04-10 23:46:12 -0700 |
|---|---|---|
| committer | wukong <wukong@longaeva> | 2026-04-10 23:46:12 -0700 |
| commit | 4c4eb1bd8f003b3b57707badd2dd089ed193a896 (patch) | |
| tree | 15b62907fffd70c46a9b4369df93ab33c6aa88ac /diff1.awk | |
| parent | e7d1781578e846a7b1d634cd43c8fab00a67b883 (diff) | |
renamed fir window generators;
minor edits to whitespace and comments for more consistent style;
Diffstat (limited to '')
| -rw-r--r-- | diff1.awk | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -3,9 +3,9 @@ ### diff1.awk # print numerical diff along columns + BEGIN { OFS = FS - # OFMT = "%.9g" sign = "[+-]?" decimal = "[0-9]+[.]?[0-9]*" fraction = "[.][0-9]*" @@ -13,6 +13,8 @@ BEGIN { number = "^" sign "(" decimal "|" fraction ")" exponent "$" } + +# column headers NR == 1 { # orig data columns for (n=1; n<=NF; n++) { @@ -29,9 +31,9 @@ NR == 1 { } } -NF { - if (NF > nf_max) - nf_max = NF + +NF > 0 { + (NF > nf_max) ? nf_max = NF : nf_max = nf_max # data columns for (n=1; n<=nf_max; n++) { |
