christiniaroelin
Programmer
i have the following sed :
sed -e "s/|| 'Ç' ||/,/g" input > output
where input is
infield1 || 'Ç' ||
in2 || 'Ç' ||
lpad ( in3 ||
in4 ||
) || 'Ç' ||
in4 || 'Ç' ||
the || 'Ç' || are the field delimiters. The expected ouput is:
infield1 ,
infield1 ,
in2,
lpad ( in3 ||
in4 ||
),
in4,
that is the or (||) should be retained where as the delimiters ahould be changed to commas( ,). The above seems to confuse between the regexpr. I tried by modifying the sed
to
sed -e "s/^|| 'Ç' ||$/,/g" input > output.
but without success.
please advice on the above.
Thanks a lot!
roelin
sed -e "s/|| 'Ç' ||/,/g" input > output
where input is
infield1 || 'Ç' ||
in2 || 'Ç' ||
lpad ( in3 ||
in4 ||
) || 'Ç' ||
in4 || 'Ç' ||
the || 'Ç' || are the field delimiters. The expected ouput is:
infield1 ,
infield1 ,
in2,
lpad ( in3 ||
in4 ||
),
in4,
that is the or (||) should be retained where as the delimiters ahould be changed to commas( ,). The above seems to confuse between the regexpr. I tried by modifying the sed
to
sed -e "s/^|| 'Ç' ||$/,/g" input > output.
but without success.
please advice on the above.
Thanks a lot!
roelin