[augeas-devel] Remove a value from an array with augtool?

Graham Leggett minfrin at sharp.fm
Sat Nov 24 01:43:12 UTC 2012


Hi all,

I am trying to edit a postfix main.cf with with augtool, and am struggling with arrays.

I can add a particular value to a given array with the set command, for example like this:

augtool> set /files/etc/postfix/main.cf/virtual_alias_maps[last()] my-map

I am struggling with the syntax to remove this value "my-map" again:

augtool> rm [what-goes-here?]

I have no idea how many elements there will be in the virtual_alias_maps parameter when I start, there could be zero, and I have no idea how many there will be when the time comes to remove the entries, so absolute values for the array index are out.

Is this possible with augtool?

Regards,
Graham
--

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4365 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/augeas-devel/attachments/20121124/3feacd7a/attachment.p7s>


More information about the augeas-devel mailing list