Search Results

Search: Posts Made By: Franklin52
1,222
Posted By Franklin52
awk '{a[$1]=a[$1]?a[$1] FS $2:$2}END {for(i in...
awk '{a[$1]=a[$1]?a[$1] FS $2:$2}END {for(i in a)print i, a[i]}' file

Here a value is assigned to the array element a[$1] with a condition expression operator:
a[$1]=a[$1]?a[$1] FS $2:$2
...
1,222
Posted By Franklin52
awk '{a[$1]=a[$1]?a[$1] FS $2:$2}END {for(i in...
awk '{a[$1]=a[$1]?a[$1] FS $2:$2}END {for(i in a)print i, a[i]}' file
Showing results 1 to 2 of 2

 

Featured Tech Videos

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