I have a file of the format, with a leading space before each line:
"Western Overseas",
"Western Overseas",
"^",
"--",
"^",
"--",
"--",
null,
24995,
9977,
"CR",
"Western Refrigeration Private Limited",
"Western Refrigeration Private Limited",
"[ICRA]A",
"--",
"[ICRA]A1",
"--",
"Stable",
null,
14951,
2346,
"CR",
I would like to convert it to a CSV file with format:
"Western Overseas","Western Overseas","^","--","^","--","--",null,24995,9977,"CR"
"Western Refrigeration Private Limited","Western Refrigeration Private Limited","[ICRA]A","--","[ICRA]A1","--","Stable",null,14951,2346,"CR"
I'm trying to use tr but am having trouble since it either prints all output to one line and seems to replace newlines with a double newline. Any help is appreciated.