写出脚本 ash1 sed 让 ttxt 文件中非句号结尾的句子和下一行拼接2 若逗号 不在结尾在逗号 前断开换行
#!/bin/bash sed -e ':a' -e 'N' -e '$!ba' -e 's/([^。])\n([^\n])/\1\2/g' t.txt | sed 's/([^,]),/\1,\n/g'
原文地址: http://www.cveoy.top/t/topic/GIP 著作权归作者所有。请勿转载和采集!
安全问答是一个知识全球问答,包含丰富的问答知识
#!/bin/bash sed -e ':a' -e 'N' -e '$!ba' -e 's/([^。])\n([^\n])/\1\2/g' t.txt | sed 's/([^,]),/\1,\n/g'
原文地址: http://www.cveoy.top/t/topic/GIP 著作权归作者所有。请勿转载和采集!