【发布时间】:2013-11-23 08:10:22
【问题描述】:
考虑下面的代码:
pattern="*.some_pattern.*"
orignalLogFile='sample.log'
outputFile='1.txt'
temp='1.log'
# match the pattern and replace with a new line
sed 's/'$pattern'/\n/' $orignalLogFile > $temp
抛出一个
'sed: -e expression #1, char 9: unterminated `s' command'
如何解决这个问题?
【问题讨论】:
标签: sed