if word1 match so I replaced it with word2

19 views
Skip to first unread message

Stan

unread,
May 22, 2013, 4:43:23 PM5/22/13
to puppet...@googlegroups.com
Hi

I would like to replace a word with another in a config file

if word1 match so I replaced it with word2

I looked augeas but it does not seem to.

you would have a different track?

thank you
regards

Nikola Petrov

unread,
May 23, 2013, 5:23:04 AM5/23/13
to puppet...@googlegroups.com
Hi

On Wed, May 22, 2013 at 01:43:23PM -0700, Stan wrote:
> Hi
>
> I would like to replace a word with another in a config file
>
> if word1 match so I replaced it with word2
>
> I looked augeas but it does not seem to.
>

Can you please tell us the specific configuration format and maybe an
example word1, word2 pattern. Augeas will most likely work here as long
as it is a known format.

> you would have a different track?


you can always use sed if you feel powered enough(I don't)

>
> thank you
> regards


>
> --
> You received this message because you are subscribed to the Google Groups "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users...@googlegroups.com.
> To post to this group, send email to puppet...@googlegroups.com.
> Visit this group at http://groups.google.com/group/puppet-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

Stan

unread,
May 23, 2013, 10:21:08 AM5/23/13
to puppet...@googlegroups.com
hi

in my origine file if puppet see

word1:

replace by word2:

not more
Reply all
Reply to author
Forward
0 new messages