Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Variable Expansion



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Sunday 03 April 2005 15:23, Matthias Berndt wrote:
> Greetings,
>
> I think my problem is quite simple, but I'm unable to find a solution.
> It is based on a bash script and I use the following lines:
>
> CLOCKPARAMS="${CLOCKPARAMS} --utc"
> hwclock --hctosys ${CLOCKPARAMS}
>
> The result is:
>
> CLOCKPARAMS=' --utc'
> hwclock --hctosys ' --utc'        # --> hwclock error
>
> How do I prevent zsh from inserting the quotes in the hwclock-command? I
> played with some expansionmodifiers - such a 'Q' - but I can't get it to
> work.
>

setopt shwordsplit

or

hwclock --hctosys ${=CLOCKPARAMS}

or

emulate sh

- -andrey
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFCT9a5R6LMutpd94wRAlhGAKCICfPrJX0Fa/v11JBmtCsPjwnMkgCgrgo2
OTVb55Y2cQBe/+Netftqn/8=
=cuAr
-----END PGP SIGNATURE-----



Messages sorted by: Reverse Date, Date, Thread, Author