我正在試圖讓我的網址更簡單,以減少垃圾郵件。當我必須通過ssh進入並且繼續在我的.htaccess中添加另一行時,它變得非常繁瑣而且非常快。所以我想知道是否有可以輕鬆地添加一行文本的方式,並且可以放在一個腳本在bash或python中寫入特定行
例子:
<Directives here>
Order Deny,Allow
Deny from 255.255.255.255
Deny from 0.0.0.0
Deny from 1.2.3.4
<Other Directives here as well as ending Directive>
現在讓我們說的笑聲我想添加127.0.0.1, 192.168.0.1這個,但由於我不能直接回應我想要的地方,我將如何去解決這個問題。 Bash或Python的答案接受
請參閱http://stackoverflow.com/questions/18272379/bash-inserting-a-line-in-a-file-at-a-specific-location – BroSlow