Each line contains text and numbers in one column. I need to calculate the sum of the numbers in each row. How can I do that? Thx
example.log contains:
time=31sec
time=192sec
time=18sec
time=543sec
The answer should be 784
awknumeric datatext processing
Each line contains text and numbers in one column. I need to calculate the sum of the numbers in each row. How can I do that? Thx
example.log contains:
time=31sec
time=192sec
time=18sec
time=543sec
The answer should be 784
Best Answer
If your
grep
support-o
option, you can try:POSIXly: