[augeas-devel] different behaviour of augtool interactively or when called by shell
Ian Mortimer
i.mortimer at uq.edu.au
Fri Nov 28 22:50:31 UTC 2014
On Sat, 29 Nov 2014, Jochen Haeberle wrote:
> But this does not work:
>
> augtool -bs set /files/etc/hosts/*[ipaddr = '192.168.0.5']/canonical
> 'host.test.com'
>
> Why's that?
The shell will expand a bare * to all files in the current directory.
You need to escape the * with a \ or quote the entire command:
augtool -bs 'set /files/etc/hosts/*[ipaddr = '192.168.0.5']/canonical
"host.test.com"'
--
Ian
More information about the augeas-devel
mailing list