Hi All,
I've just pushed a python script to github at
https://github.com/georgehansper/augprint.py
<https://github.com/georgehansper/augprint.py>
This script will print out a complete set of augtool set-statements for
a file, with the sequence numbers replaced by path-expressions
eg. where:
augtool print /files/etc/hosts
would output lines something like this:
/files/etc/hosts/1/alias[3] = "localhost4.localdomain4"
augprint.py /etc/hosts
produces something like this:
set
/files/etc/hosts/*[ipaddr='127.0.0.1']/alias[.='localhost4.localdomain4']
'localhost4.localdomain4'
The output is not quite idempotent (yet), though it gets very close.
Regards,
George Hansper
_______________________________________________
augeas-devel mailing list
[email protected]
https://listman.redhat.com/mailman/listinfo/augeas-devel