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.
yum -y groupinstall "${grpdesk[@]}"
(quoted and using [@]) -- at the risk of blowing my own horn, this SO question is very relevant: http://stackoverflow.com/q/12314451/7552 – glenn jackman Jan 23 '16 at 15:53