diff options
| author | wukong <wukong@longaeva> | 2018-09-09 23:48:31 -0700 |
|---|---|---|
| committer | wukong <wukong@longaeva> | 2018-09-09 23:48:31 -0700 |
| commit | d1f6c89be163d9399d569e01458242d8ce15e041 (patch) | |
| tree | a263822af5cb1532f9eb1abe7b7ae6334c27d170 /sum2.awk | |
| parent | e42cee748f5bc38d11742739b5e2cad4b6a07c43 (diff) | |
added summations to quad_reg
added in-progress lpf.awk (low pass filter), an adaptation of convolution
script (conv.awk) to use delmitied columns as input
additional tweaking of OFMT, OFS, and conditional print statements
Diffstat (limited to '')
| -rw-r--r-- | sum2.awk | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -3,7 +3,9 @@ ### sum2.awk, print column sums # check that each line has the same number of fields as line one -NR==1 { nf_max = NF } +BEGIN { OFS = FS } + +NR == 1 { nf_max = NF } { for (i=1; i<=NF; i++) @@ -13,6 +15,6 @@ NR==1 { nf_max = NF } } END { - for (i=1; i<=NF; i++) + for (i=1; i<=nf_max; i++) printf(OFMT "%s", sum[i], i < nf_max ? OFS : ORS) } |
