【发布时间】:2014-09-17 06:01:29
【问题描述】:
谁能帮我开发以下脚本?
我在 /etc/httpd/httpd.conf 文件中有以下条目
<VirtualHost 192.168.1.181:80>
DocumentRoot /var/www/html/
ServerName example.com
</VirtualHost>"
如果有人输入了 example.com,我需要从同一个文件 /etc/httpd/httpd.conf 中完全删除 example.com 的相同虚拟主机条目。我该怎么做?
【问题讨论】:
-
是否要删除
.. 的完整部分? -
是的,我想删除该虚拟主机的完整部分
-
为什么会这样,你有什么解决办法
-
我尝试了一些东西,但它在 bash 中并不能很好地工作,我可以在 python 中这样做,但在 bash 中我没有得到它
-
你能用python吗
标签: linux bash shell command-line