我有一个bash字符串,看起来像这样:
string="This is the first line.
This is the second line"
我想将其转换为git commit消息,因此我需要在第一行之后插入空白行以使其成为提交标题,在第二行之后插入提交主体,以便扩展如下所示:
This is the first line.
This is the second line
在bash中实现此目标的最简单方法是什么?
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句