Calculate with line entries
Hello all,
for the following file test.dat, I'm trying to do a simple calculation with the single line entries for every row. content of test.dat: Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 The task is to calculate the line entries like that: Code:
(7+10+13)/3 --> write result to row 16 I tried Code:
awk '{print ($7+$10+$13)/3}' test.dat >> check.dat Kind regards |
is there any question here? Do you need any help? Is it a duplicate again?
|
@vanKey: Please review the Site FAQ for guidance in asking well formed questions. Especially visit the link from that page, How to Ask Questions the Smart Way for discussion of things to consider when asking others for help.
Everyone here is happy to help you learn, but please make effort to formulate your questions more completely with the necessary context and applicable example data, and add questions which are just variations on each theme to the original threads. Doing so helps others to follow the longer discussion and makes the whole context clear to future visitors. From the above linked page: Quote:
|
All times are GMT -5. The time now is 02:37 PM. |