in reply to perl one liner to search for a string, then search for a different string and append a new line
Great! 99.9% there. :)
Current code is:
perl -0777 -elnp 's|(<Directory "/usr/local/awstats.+?</Directory>)|$1+\nCustomLog /usr/local/awstats/logs/access_log comdinedio|s' httpd.confIt does everything I want, except there is a line-feed followed by another line-feed and a question mark after 'combinedio.' That is:
CustomLog ... combinedio ?
Any ideas how to get rid of at least the question mark?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: perl one liner to search for a string, then search for a different string and append a new line
by BradV (Sexton) on Dec 20, 2012 at 14:32 UTC |