Search Results

Search: Posts Made By: Booo
1,112
Posted By RudiC
Try awk -F, ' {i = 0 MX =...
Try
awk -F, '
{i = 0
MX = split ($2, T, "]") - 2
while (i <= MX) {OUT = $1 OFS SQ
while ((length (OUT T[i+1]) < 255) && (i <=...
2,611
Posted By Don Cragun
You didn't answer the question about what shell...
You didn't answer the question about what shell you're using. The following was written and tested using a Korn shell, but should work with any shell that is based on Bourne shell syntax (e.g., ash,...
1,820
Posted By RudiC
So - what (except for the strange, non-existing -...
So - what (except for the strange, non-existing - but not hurting - $4) don't you like with your own approach?
1,820
Posted By Don Cragun
As RudiC said, it looks like: awk '{a[$1"...
As RudiC said, it looks like:
awk '{a[$1" "$2]+=$3+$4}END{for (i in a){print i,a[i]}}' filename
should work, but since there are only 3 fields in any of your input lines, you should get the same...
1,543
Posted By Corona688
Your input file must have had carriage returns in...
Your input file must have had carriage returns in the first place. Oh well.
Showing results 1 to 5 of 5

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