#!/bin/bashs='1,23,45,6'awk -F, '{print $0 OFS $1+$2}' OFS=, <<< "$s"echo "---"awk 'BEGIN{FS=OFS=","} {print $0 OFS $1+$2}' <<< "$s"echo "---"awk -F, '$0=$0FS$1+$2' <<< "$s"
Standard input is empty
1,2,3 3,4,7 5,6,11 --- 1,2,3 3,4,7 5,6,11 --- 1,2,3 3,4,7 5,6,11
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!