Search Results

Search: Posts Made By: fastlane3000
6,985
Posted By fastlane3000
maybe you're not using the same awk than i have...
maybe you're not using the same awk than i have (i've got a gnu version called gawk)
just try "rdrtx1 (https://www.unix.com/members/302126107.html)"'s solution it's more complete with a "sort"...
6,985
Posted By fastlane3000
in case you need to add "%" and use float ...
in case you need to add "%" and use float

awk '{ A[$2]++ } END { for(X in A) printf("%d\t%.2f%\n", X, (A[X]*100)/NR) }' inputfile
Showing results 1 to 2 of 2

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