sed (or awk) to sum values in a csv file -
I have a CSV file where lines look like this:
foo, bar To change the last 3 values in a nutshell, I need a command:
If possible I need a liner.
awk -F, '{print $ 1, $ 2, $ 3, $ 4 + $ 5 + $ 6} '"Post-Text" itemprop = "text"> OFS =, file
and not for a fixed length: < Printf ("% s,", $ i)} {Print $ NF + $ (NF- 1) + $ (NF-2)} 'file
is not the right tool for arithmetic.
Comments
Post a Comment