$ echo "$val" | sed 's/^/type_config,/g'
Saída:
type_config,mapreduce.map.memory.mb,3584
type_config,mapreduce.map.java.opts,-Xmx2560m
type_config,mapreduce.reduce.memory.mb,3584
type_config,mapreduce.reduce.java.opts,-Xmx2560m
type_config,mapreduce.task.io.sort.mb,1280