Quantcast
Channel: UNIX and Linux Forums
Viewing all articles
Browse latest Browse all 16232

Bash Sum up for spezific Numbers

$
0
0
Hello everyone,

I need your assistance with bash.
I want to sum up some numbers, that's not the big problem i think, but the values i want to some depending on another number.

For example, I have a file with some rows of content.
Number 1, Number 2, other content.

I want to sum up number 2 for every row number 1 is the same.
So i can get one row which shows me the number 1 first and then the sum of number 2, so i can see the sum for each number 1.

Hope you understand what i mean. :/
Is that possible with bash?

Sincerely
Bruder_Bruno

Viewing all articles
Browse latest Browse all 16232

Trending Articles