|
:cool: ;)
将前面解决问题代码以变量实现.
http://www.linuxsir.cn/forum.php?mod=viewthread&tid=124338
出现错误
- #!/bin/bash
- logflag=g2m
- logyear=2004
- string="<a href\=\\"game\/200403\/awstats\.game\.html\\" target\=_blank>07<\/a> \ "
- file="index.html"
- [color=red]cat $file | sed -n '/<\!-- '$logflag' -->/,/<\!-- \/'$logflag' -->/{/'$logyear'/{s/$/'$string'/p}}'[/color]
复制代码
error:
sed: -e expression #1, char 47: Unterminated `s' command
KornLee兄能否指点一下 |
|