I have a file, say test.txt which looks like a json and it contains a single line of data:
{"a":"b"},{"c":"d, e, f"},{..} and so on
I need to save all the data within each pair of braces in a different file in separate lines.
For eg: result.txt having
"a":"b"
"c":"d, e, f"
I used awk with regex in bash scripting
awk '/\{(.*?)\}/' test.txt > result.txt
But instead of cropping up individual braces, it's printing the exact test file as it is.
Can anyone say what's going wrong?