insert new line in files
Adam Vande More
amvandemore at gmail.com
Fri Feb 6 17:18:08 PST 2009
Steve Bertrand wrote:
> Adam Vande More wrote:
>
>
>>> I also tried escaping ( ) . / to no avail.
>>>
>> nevermind I see I have to \\ that as well. Okay now I'm going to try to
>> find a way to do this with find and xargs
>>
>
> IMHO, this has become a job for Perl :)
>
> Steve
>
Thanks for help everyone. My final command was this:
skynet1# find . -name 'filename.php' | xargs sed -i.old -e '37a\\
include("/usr/home/www/imp-sites/default_inventory.php");'
I used double quotes because I couldn't finger out how to the single
quote. Good enough for me.
More information about the freebsd-questions
mailing list