Bash surprising behaviour - zypper "$LIST" give error

Hello.
I have a piece of code :

A_LIST="kwrite  yast2-online-update-configuration  "
zypper in "$A_LIST"

And get this error :

Loading repository data...
Reading installed packages...
'kwrite  yast2-online-update-configuration  ' not found in package names. Trying capabilities.
No provider of 'kwrite  yast2-online-update-configuration  ' found.
Resolving package dependencies...
Nothing to do.

Any help is welcome

Hi
Curly brackets…


zypper in ${A_LIST}

You needed:

A_LIST="kwrite  yast2-online-update-configuration  "
zypper in $A_LIST

Those quotes in the last line caused your problem.

Thank you all.