Skip to content

Instantly share code, notes, and snippets.

@raphink
Last active December 11, 2015 00:29
Show Gist options
  • Save raphink/4516918 to your computer and use it in GitHub Desktop.
Save raphink/4516918 to your computer and use it in GitHub Desktop.
$ cat /etc/passwd | auged --lens Passwd.lns set root/shell /bin/zsh
# passwd content with replacement
$ cat /etc/passwd | auged --lens Passwd.lns -f commands.augtool
# passwd content modified by commands.augtool commands
$ auged --lens Passwd.lns -i 'set root/shell /bin/zsh' /etc/passwd
# no output, replaces /etc/passwd in place
$ auged --lens Passwd.lns 'get root/shell' /etc/passwd
/bin/sh
$ auged --lens Passwd.lns 'get */shell' /etc/passwd
/bin/sh
/bin/bash
/bin/zsh
# etc.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment