Hi Experts,
I have a file with some of the records contain double quotes. If I found a double quote(") in any particular record , I need to look for the next double quote in that particular record and in between these quotes, if any comma(,) is there I need to replace with Tilde (~) in the same file.
For Example:
123,abcd,FirstRecord
345,"abc,cde",SecondRecord
567,ghij,ThirdRecord
789,"klmn,opq",FourthRecord"
908,"zwec,ctu,kyz",FifthRecord
Output should be like this:
123,abcd,FirstRecord
345,"abc~cde",SecondRecord
567,ghij,ThirdRecord
789,"klmn~opq",FourthRecord
908,"zwec~ctu~kyz",FifthRecord
Can you please help in this scenarios in shell scripting