例如 test.txt 文本内容如下:
{"AT5G60200": [{"source": "At1g10210", "target": "At1g10210", "index": "0", "interolog_confidence": 1.0, "correlation_coefficient": 1.0, "published": false, "reference": "None"}, {"source": "At1g10210", "target": "At1g59580", "index": "0", "interolog_confidence": 0.0, "correlation_coefficient": 0.831, "published": true, "reference": "PubMed19095804"}, {"source": "At1g10210", "target": "At5g60200", "index": "1", "interolog_confidence": 0.0, "correlation_coefficient": 0.424, "published": true, "reference": "PubMed19095804"},
选定}, 在其之后换行
cat test.txt | sed 's/},/},\n/g' > result.txt
结果如下
截图录屏_选择区域_20201114130252.png
网友评论