If I had a string with escaped commas like so:
a,b,{c\,d\,e},f,g
How might I use awk to parse that into the following items?
a
b
{c\,d\,e}
f
g
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
a, using ‘,‘ as delimiterbfroma, merging lines that end in ‘\‘b(Note: Starts at 2 since first item is blank)This solution presumes (for now) that ‘
,‘ is the only character that is ever escaped with ‘\‘–that is, there is no need to handle any\\in the input, nor weird combinations such as\\\,\\,\\\\,,\,.