I want to add numbers from two txt files. The number will change in file1, and file2 should update itself like this file2 = file1 + file2. Decimals not needed.
Example:
file1
3 file2
7 Output:
file1
3 file2
10 I tried $ paste file1 file2 | awk '{$0 = $1 + $2}' > file2 but all it does is copy the number from file1 to file2.