Hello,
I have a table that looks like what is shown below:
I would like the total counts depending on the set they belong to:
if search pattern is in
or if pattern is in
So, w.r.t the above table the output should be Type1 = 6 & Type2 Counts = 5
I can do a simple awk for each type like so and then add them together, but it does not seem very efficient. Any (one liner)suggestions?
Many thanks!
~Guss
I have a table that looks like what is shown below:
Code:
AA
BB
CC
XY
PQ
RS
AA
BB
CC
XY
RS
if search pattern is in
Code:
{AA, BB, CC} --> count them as Type1 | wc -l
Code:
{XY, RS, PQ} --> count them as Type2 | wc -l
I can do a simple awk for each type like so and then add them together, but it does not seem very efficient. Any (one liner)suggestions?
Many thanks!
~Guss