[augeas-devel] Re: [shellvars] value with spaces

Free Ekanayaka free at 64studio.com
Tue Oct 21 04:44:52 UTC 2008


Hi David,

thanks for you detailed and clear answer.

|--==> On Fri, 17 Oct 2008 10:03:16 -0700, David Lutterkort <lutter at redhat.com> said:

  DL> On Fri, 2008-10-17 at 12:55 +0200, Free Ekanayaka wrote:
  >>Hi,
  >>
  >>the /etc/default/apmd file contains a variable with a space inside its
  >>value:
  >>
  >>APMD="--proxy-timeout 30"
  >>
  >>and priting the variable with augtool results in:
  >>
  >>~$ augtool print /files/etc/default/apmd/APMD
  >>/files/etc/default/apmd/APMD = "\"--proxy-timeout 30\""

  DL> The way this is printed is probably a bad idea, since it's not how you
  DL> type it in. Can you file a bug about that inconsistency ?

Sure, just did it.

[...]

  DL> What you want (in augtool) is
  augtool> set /files/etc/default/apmd/APMD '"--proxy-timeout 31"'
  augtool> save

  >>From the shell, that has to be
  DL>         ~$ (echo set /files/etc/default/apmd/APMD "'\"--proxy-timeout 31\"'"; echo save)|augtool

That made it, thanks. The only problem is that I believe I can't use
shell variables between single quotes, while I'd like to write something like

~$ (echo set /files/etc/default/apmd/APMD "'\"--proxy-timeout $MY_TIMEOUT_VALUE\"'"; echo save)|augtool

Any idea?

  DL> Ain't quoting fun ?

Definitely, I couldn't live without it :)

Ciao,

Free




More information about the augeas-devel mailing list