> -o -ops Specify the operation that should be applied to opCol. > Valid operations: > sum, count, min, max, > mean, median, mode, antimode, > stdev, sstdev (sample standard dev.), > collapse (i.e., print a comma separated list > (duplicates allowed)), > distinct (i.e., print a comma separated list (NO > duplicates allowed)), > concat (i.e., merge values into a single, > non-delimited string), > freqdesc (i.e., print desc. list of values:freq) > freqasc (i.e., print asc. list of values:freq) > - Default: sum
I'm not sure that I understand this option. I assume that if I don't specify it I should by default have the sum option. By the following test case demonstrates that it is not the case. ~$ ./main.sh groupBy -g 1,2,3 -c 4 -i input1.txt 2>/dev/null groupBy -g 1,2,3 -c 4 -o sum -i input1.txt chr1 - 1 3 chr1 + 1 2 ~$ cat input1.txt chr1 - 1 1 chr1 - 1 2 chr1 + 1 2 ~$ cat main.sh #!/usr/bin/env bash set -v groupBy -g 1,2,3 -c 4 -i input1.txt 2>/dev/null groupBy -g 1,2,3 -c 4 -o sum -i input1.txt -- Regards, Peng