|
Thanks Chris and Kevin. I made it a little further. My problem was the missing / after the last 109. It now runs successfully, but I end up with an empty file. Here is the command I ran. I did try it using [] around the periods as well, but that didn't make a difference. I also tried adding "g" at the end, but that didn't help either. I'm probably doing something silly. I double checked the name of the file I'm testing with.
STRQSH CMD('sed "s/10\.2\.0\.109/10.202.0.109/" /home/jdeane/httpd_dr.conf > /home/jdeane/httpd_dr.conf')
Here are the first few lines of the configuration file.
# Configuration originally created by Create HTTP Server wizard on Thu Jan 18 15:55:35 EST 2018
Listen 10.2.0.109:8700
DocumentRoot /www/websvc_prd/htdocs
TraceEnable Off
Options -ExecCGI -FollowSymLinks -SymLinksIfOwnerMatch -Includes -IncludesNoExec -Indexes -MultiViews
LogFormat "%h %T %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%{Cookie}n \"%r\" %t" cookie
LogFormat "%{User-agent}i" agent
LogFormat "%{Referer}i -> %U" referer
LogFormat "%h %l %u %t \"%r\" %>s %b" common
CustomLog logs/access_log combined
LogMaint logs/access_log 14 0
LogMaint logs/error_log 14 0
As you can see, the second line contains the ip address I want to update. Not sure why it is wiping out the entire file.
Dean Eshleman
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.