#!/bin/bash

合并非句号结尾的句子和下一行

sed -e ':a;N;$!ba;s/([^。])\n([^。])/\1\2/g' t.txt > t1.txt

在不是开头的地方断开 because 前的换行

sed -e 's/([^。]) because/\n\1 because/g' t1.txt > t2.txt

删除临时文件

rm t1.txt

echo '处理完成!'


原文地址: http://www.cveoy.top/t/topic/lXax 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录