Keep It Simple, Stupid | |
PerlMonks |
Re: perl one liner to search for a string, then search for a different string and append a new lineby BradV (Sexton) |
on Dec 20, 2012 at 14:18 UTC ( [id://1009749]=note: print w/replies, xml ) | Need Help?? |
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:
Any ideas how to get rid of at least the question mark?
In Section
Seekers of Perl Wisdom
|
|