[brlug-general] SED append help
Brad Bendily
bendily at gmail.com
Fri Jul 11 09:44:28 CDT 2008
how about something like:
sed -e '/preload/s/$/;help/g' testfile
On Fri, Jul 11, 2008 at 9:06 AM, Keith M. Richard
<krichard at ogb.state.la.us> wrote:
> All,
>
>
>
> I am in need of a little help with sed. I have Googled it to
> death and haven't found anything that can help so here goes. I want to
> search a configuration file for a certain element and then append something
> to the end of that line. I just want to append to the line no matter what
> else is on it. I can do a full replace of the line, but I would rather just
> append a new key to the end. The reason I want to append is some config
> files may have more keys than others.
>
>
>
> EXAMPLE:
>
> Searching for this element (preload): preload=fastbox;valid
>
> It may also look like this: preload=fastbox;valid;eye
>
> Appended line after sed: preload=fastbox;valid;xalid
>
>
>
>
>
> Keith M Richard
>
> State of Louisiana
>
> Office of Group Benefits
>
> IT Tech Support Specialist 3
>
> krichard at ogb.state.la.us
>
>
>
> _______________________________________________
> General mailing list
> General at brlug.net
> http://mail.brlug.net/mailman/listinfo/general_brlug.net
>
>
--
Have Mercy & Say Yeah
More information about the General
mailing list