小编use*_*738的帖子

sed:多行替换配置块

我有一些基本看起来像的配置文件

(...content...)
# BEGIN DYNAMIC BLOCK - DO NOT EDIT MANUALLY
(... more content ...)
# END DYNAMIC BLOCK
(... even more content ...)
Run Code Online (Sandbox Code Playgroud)

现在,在 bash 中使用CONTENT=`wget -O - http://$SERVER/get_config.php`,我可以替换动态块。

我现在如何进行替换以及如何让脚本在文件末尾插入块(如果它不存在)?

sed shell-script text-processing

5
推荐指数
1
解决办法
5200
查看次数

debian-installer:报告安装进度

我可以使用 preseed 使 debian 安装程序向服务器报告其进度吗?

我想像打电话wget http://x.tld/stage_finished.php?s=partitioning_completed报告进展之类的事情。

现在,我必须等到late_command钩子实现进度报告,但在设置完成后才调用。

debian system-installation

5
推荐指数
1
解决办法
254
查看次数