bowei_99 has asked for the wisdom of the Perl Monks concerning the following question:
The line I want to insert is:echo ":os:5.7:" >> /mnt/install_list [text removed here ....] echo ":app:name-here:" >> /mnt/install_list
I tried the following command as a start:echo ":app:new-name-here:" >> /mnt/install_list
I expected 'test' to be inserted in the test.cfg file, but it didn't work. Thoughts on getting this to work?perl -p -i.bak -e 's/echo*install_list(?!.*echo*install_list)/test/m' +test.cfg
-- Burvil
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Look Ahead regexp to insert line?
by choroba (Cardinal) on Oct 02, 2012 at 00:07 UTC | |
by bowei_99 (Friar) on Oct 02, 2012 at 00:37 UTC | |
by choroba (Cardinal) on Oct 02, 2012 at 00:54 UTC | |
Re: Look Ahead regexp to insert line?
by kcott (Archbishop) on Oct 02, 2012 at 01:51 UTC | |
Re: Look Ahead regexp to insert line?
by BillKSmith (Monsignor) on Oct 02, 2012 at 01:29 UTC |