0

I know, the group names that contains spaces has to be enclosed by quotes and they are, still this does not want to work out as I would expect it:

export instdesk="xterm java-1.8.0-openjdk xrdp tigervnc-server"
export grpdesk=(Desktop "Desktop Platform" "General Purpose Desktop" "X Window System" "Legacy X Window System compatibility" Fonts)
yumdesk() {
for ginstdesk in "${grpdesk[@]}"; do
    yum -y groupinstall $ginstdesk
done
}

Have tried simply just yum -y groupinstall ${grpdesk[*]} still won't work.

obeliksz
  • 300

1 Answers1

0

Apparently there is a space in the value of $ginstdesk, so it needs to be quoted.

Jeff Schaller
  • 67,283
  • 35
  • 116
  • 255