I have many files that has the following structure.
CHR SNP BP A1 TEST NMISS OR SE L95 U95 STAT P
1 rs2980319 766985 A ADD 4948 1.068 0.08356 0.9065 1.258 0.7853 0.4323
1 rs2980319 766985 A VAR1 4948 1.109 0.02484 1.057 1.165 4.177 2.952e-05
1 rs2980319 766985 A VAR2 4948 1.567e+27 2.441 1.31e+25 1.875e+29 25.65 4.009e-145
1 rs2980319 766985 A VAR3 4948 3.031e+12 2.221 3.902e+10 2.355e+14 12.94 2.63e-38
I want to output certain columns and lines which only contain "ADD" in the 5th column.
I am trying to use GNU parallel and am having no luck getting output.
>parallel ""awk 'NR==1{print $2, $1, $3, $4, $7, $9, $10, $12; next} $5=="ADD"{print $2, $1, $3, $4, $7, $9, $10, $12 | "sort -gk8"}' OFS="\t" {1}_fileA.assoc > {1}_fileA.assoc.ADD
The syntax seems too dense for me.
Any help is appreciated.

