Search Results

Search: Posts Made By: Pingping
87,390
Posted By jaduks
This can be done using associative array in awk. ...
This can be done using associative array in awk.



$ cat nayan.out
saman 1
gihan 2
saman 4
ravi 1
ravi 2

$ awk '{arr[$1]+=$2} END {for (i in arr) {print i,arr[i]}}' nayan.out >...
Showing results 1 to 1 of 1

 
All times are GMT -4. The time now is 04:07 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy