Sample Header Ad - 728x90

With Augeas, how can i modify the value of an attribute, using the current value?

0 votes
2 answers
1217 views
Let's say I have some generic INI-type file, covered best by the Samba.lns. I have an entry like: attribute = value And I want to _transform_ value to Some-VALUE-x. For a more concrete example: augtool> print /files/etc/yum.conf/main/cachedir /files/etc/yum.conf/main/cachedir = "/var/cache/yum/$basearch/$releasever" And I want to change the value to: "/var/cache/yum/noarch/$releasever" That is, I want to replace $basearch with noarch and leave the rest alone. My actual example is a little more complex. Can I even do this within augeas?
Asked by Otheus (6357 rep)
Sep 27, 2016, 10:57 PM
Last activity: Oct 4, 2016, 06:11 PM