Search Results

Search: Posts Made By: nezabudka
8,947
Posted By nezabudka
awk {gsub(",", "", $5); sum+=$5} END {print sum}'...
awk {gsub(",", "", $5); sum+=$5} END {print sum}' file
may be not "$5" field
awk {gsub(",", ""); sum+=$0} END {print sum}' file
8,947
Posted By nezabudka
Hi, did I understand correctly? awk -F, 'NR ==...
Hi, did I understand correctly?
awk -F, 'NR == 5 {for(i = 1; i <= NF; i++) sum+=$i; print sum}' file
294

--- Post updated at 10:30 ---

awk '{sum = 0; t = split($5, arr, ","); for(i = 1; i <=...
Showing results 1 to 2 of 2

 
All times are GMT -4. The time now is 02:23 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy