
09-15-2007
|
 |
Shell programmer, author
|
|
Join Date: Mar 2007
Location: Toronto, Canada
Posts: 974
|
|
Quote:
Originally Posted by dhuertas
I have in my directory, n-files, like 1.dhm, 2.dhm, 3.dhm.
These files have 1 column with 1 value per line, like:
1.dhm
------
10
20
30
40
50
2.dhm
------
30
50
20
50
80
What I need here, is to make a result file, adding each per file, in this case:
result.txt
---------
40
70
50
90
130
|
Code:
paste -d+ *.dhm | bc > result.txt
|