Hi guys,
I've got data like this,
term periode rates
2006 3M 0.85
2006 7M 0.9
2006 9M 0.7
2007 2M 0.6
2007 5M 0.5
the formula is
rates_2006 = rates(3M)*0.5 + rates(9M) --> which is
0.85*0.5 + 0.7
rates_2007 = rates(2M)*0.4 --> which is
0.6 * 0.4
How do I do in awk :
like
awk '
$1 != year { please help me fill inside
year = $1
}'
I've got data like this,
term periode rates
2006 3M 0.85
2006 7M 0.9
2006 9M 0.7
2007 2M 0.6
2007 5M 0.5
the formula is
rates_2006 = rates(3M)*0.5 + rates(9M) --> which is
0.85*0.5 + 0.7
rates_2007 = rates(2M)*0.4 --> which is
0.6 * 0.4
How do I do in awk :
like
awk '
$1 != year { please help me fill inside
year = $1
}'