【发布时间】:2018-07-09 17:03:25
【问题描述】:
我需要在这个脚本中的变量中替换sed 行,然后只使用变量。
cat postfix > "file.html"
cal -h | sed '1{s|^|<table>\n<tr><th colspan="7">|;s|$|</th></tr>|};2,${s|\(..\) |<td>\1</td>|g;s|^|<tr>|;s|$|</tr>|};$s|$|\n</table>|' >> file.html
cat prefix >> "file.html"'
【问题讨论】:
标签: linux bash shell variables sed