Hi Guys,
I want to add this logic to my existing Unix code.How to append the changes to my input file (valar.csv ) in place .
I tried creating a tmp file:
TMPFILE=${sourceDN}/tmp.csv
awk -F, '
NR==1 {next}
{$1=$1; print}
{$3 = $3 "D"; $11 = 3; $19 = ($19==1?2:1);$13 = $14 = $15 = $25 $28 = "Y"}
1' OFS=, ${inputFile} > ${TMPFILE}
mv ${TMPFILE} ${inputFile}
I am getting this error:
syntax error The source line is 4. The error context is {$3 = $3 "D"; $11 = 3; $19 = ($19==1?2:1);$13 = $14 = $15 = $25 $28 >>> = <<< "Y"} awk: The statement cannot be correctly parsed. The source line is 4.