I was initially building on that question and answer (Using awk to sum the values of a column, based on the values of another column) but apparently I have to create a new question.
I have a tsv files with multiple columns. When the second column is empty, I would like to sum the corresponding values of the column 3. And when the column 2 is not empty (it has changing content that vary from a line to another) I would like to sum the corresponding values of the column 3. Example:
ColumnA ColumnB ColumnC One 10 Little STH 15 Red XIV 55 Car 20
Output would be just: 30 and 70 Is it something possible? Can we tell: count when it's empty and count when it's not?
Thanks a lot for your help, Ben