Skip to content
Advertisement

Awk: How do I count occurrences of a string across columns and find the maximum across rows?

I have a problem with my bash script on Linux.

My input looks like this:

JavaScript

etc…

which y=yes and n=no and that is the results of voting… and now I want with using awk to display the name and the total yes vote of each person (name) and the person that win (got the most y), any ideas?

I do something like this:

JavaScript

Advertisement

Answer

What about this?

JavaScript
User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement