Skip to content

Instantly share code, notes, and snippets.

@raphink
Created August 25, 2015 09:53
Show Gist options
  • Save raphink/9621f15cf4688fa6e487 to your computer and use it in GitHub Desktop.
Save raphink/9621f15cf4688fa6e487 to your computer and use it in GitHub Desktop.
Edit shell script with Augeas
$ cat /tmp/test.sh
echo foo | tee bar.txt || TRUC_EGAL=baz
$ augtool -I lenses/ -Ast "Shellvars.lns incl /tmp/test.sh" set /files/tmp/test.sh/@command/@pipe/@command cat
Saved 1 file(s)
$ cat /tmp/test.sh
echo foo | cat bar.txt || TRUC_EGAL=baz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment