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

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -