RosettaCodeData/Task/CSV-data-manipulation/Tcl/csv-data-manipulation-2.tcl

7 lines
133 B
Tcl

set f [open example.csv r]
puts "[gets $f],SUM"
while { [gets $f row] > 0 } {
puts "$row,[expr [string map {, +} $row]]"
}
close $f