【发布时间】:2012-07-27 06:25:00
【问题描述】:
我喜欢使用 AWK 或 SED 将 {st,corridor,tunnel} 之后的行合并为一行
Input
abcd
efgjk
st
wer
dfgh
corridor
weerr
tunnel
twdf
Desired output
abcd
efgjk st
wer
dfgh corridor
weerr tunnel
twdf
【问题讨论】:
-
请问是否真的需要使用 awk 或 sed 来满足您的情况?您是否正在尝试学习 awk 和 sed 技术?还是你只想solve the problem?