[talk] insert line after matched pattern (fwd)

Franco Fichtner franco at opnsense.org
Wed Aug 19 12:05:26 EDT 2015


Hi,

I had a similar issue once, maybe this code snippet
can help you (basically going the route of an extra file
with multiple lines):

https://github.com/opnsense/tools/blob/544cb95fda/build/core.sh#L78-L79

Not a beauty and not in production code anymore, but it
did work.  :)


Cheers,
Franco

> On 19 Aug 2015, at 17:59, freebsd at fongaboo.com wrote:
> 
> 
> Anyone know how to insert a line after a matched pattern using sed, awk or any other method that gets the job done? Any tutorials I find seem not to work in BSD due to GNU sed vs. non-GNU?
> 
> -------------------------------------------------------------------------
> shot through the heart              ooh baby do you know what that's worth
> and you're to blame                         ooh heaven is a place on earth
> darling you give love                  they say in heaven love comes first
> a bad name                              we'll make heaven a place on earth
> ORBITAL                                                     "Halcyon Live"
> 
> _______________________________________________
> CDBUG-talk mailing list
> CDBUG-talk at lists.nycbug.org
> http://lists.nycbug.org/mailman/listinfo/cdbug-talk
> 
> _______________________________________________
> talk mailing list
> talk at lists.nycbug.org
> http://lists.nycbug.org/mailman/listinfo/talk




More information about the talk mailing list