Help Needed in understanding this command

Hi All,

I search the forum for my query, Glad that got solution to it. But i really want to understand how does this command work.

sed -e ':a' -e 's/\("[^"]*\),\([^"]*"\)/\1~\2/;ta'

Basically it is replacing all the comma(,) characters in between quotes with a tilde.

Specially what does ':a' , ';ta' do here.

Many Thanks

:a is just a label. ta says that as long as the expression is true go back to the label a and do it again.

When you are looking at sed s expressions, always find the delimiters first.

s/left/right/flags

In this case left is \("[^"]*\),\([^"]*"\).
Break that further down by noticing the syntax \( ... \).
These capture text in the middle so it can be printed with \1 and \2 on the right.