My data file is
sdfsdfsdf
1 0.5000 0.5000 0.5000 8 7 90 135 90 135 1
2 0.5000 0.5000 0.0000 8 7 90 -45 90 -45 1
3 0.0000 0.5000 0.5000 8 7 90 225 90 225 1
4 0.5000 0.0000 0.5000 8 7 90 45 90 45 1
sdfsdfsdf
sdfsdfsdfsdfsdfsdfsdf
and I want to change 7th and 9th column of 2~5 lines, so the result to look like
sdfsdfsdf
1 0.5000 0.5000 0.5000 8 7 60 135 60 135 1
2 0.5000 0.5000 0.0000 8 7 60 -45 60 -45 1
3 0.0000 0.5000 0.5000 8 7 60 225 60 225 1
4 0.5000 0.0000 0.5000 8 7 60 45 60 45 1
sdfsdfsdf
sdfsdfsdfsdfsdfsdfsdf
How do I this with sed or awk? I tried
awk 'NR>=2&&NR<=5{$7="60"}' input.dat > tmp && mv tmp input.dat
but this doesn't work