I need to write a script to add the one-line value of several files and put the total of the addition into another file.
For example, I have 10 files named errlog.box1
errlog.box2
errlog.box3 ...,etc
each file only contains a number...so, suppose if I do a more on errlog.box1 and it shows 532
more on errlog.box2 and it shows 147
more on errlog.box3 and it shows 312
I need a way to create a file called errlog.total that will
ONLY have the total of the other 3 files..in this case, it should only show one line that says 991
any help is greatly appreciated
thanks
For example, I have 10 files named errlog.box1
errlog.box2
errlog.box3 ...,etc
each file only contains a number...so, suppose if I do a more on errlog.box1 and it shows 532
more on errlog.box2 and it shows 147
more on errlog.box3 and it shows 312
I need a way to create a file called errlog.total that will
ONLY have the total of the other 3 files..in this case, it should only show one line that says 991
any help is greatly appreciated
thanks