【发布时间】:2012-11-16 13:12:17
【问题描述】:
尝试使用 sed(在 bash 脚本中)进行一些子字符串编辑
string1=randomthing0]
string2=otherthing[15]}]
string3=reallyotherthing[5]]
目的是当 ]s 不像第二个那样用作索引类型时删除它。 输出应该是
string1=randomthing0
string2=otherthing[15]}
string3=reallyotherthing[5]
【问题讨论】: