# If you'd like to omit non-matching lines from the result; add ';d' to the end of the expression.
sed -E 's/\n(?=[^"]+?"\s*$)/ /gm;t' <<< "ability,n. 能力,能耐;才能
able,adj. 能; 有能力的;能干的
about,\"prep. 关于;大约
n. 大致;粗枝大叶;不拘小节的人
adj. 在附近的;四处走动的;在起作用的
adv. 大约;周围;到处\"
above,\"prep. 超过;在……上面;在……之上
n. 上文
adj. 上文的
adv. 在上面;在上文\"
accident,n. 事故;意外; 意外事件;机遇
accurate,adj. 精确的
ache,\"n. 疼痛
vi. 疼痛;渴望\"
activity,n. 活动;行动;活跃
actor,n. 男演员;行动者;作用物
actress,n. 女演员
actually,adv. 实际上;事实上"
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for SED, please visit: https://www.gnu.org/software/sed/manual/html_node/The-_0022s_0022-Command.html