cat 1 Type=0 Param_Code=1 Param_Name=2 cat 2 1, 2 3, 4 . ./1 awk -F"[, ]+" '{print '"$Type"',$'"$Param_Code"',$'"$Param_Name"'}' 2 0 1 2 0 3 4