0

this is a question similar to the mine I asked you yesterday (how to iterate installation in a row).
I need a script that starting from an RHSA list as argument, separated by " " spaces, it performs this command in one row but with commas instead of space. For example, the argument of the script is the list

FIRST_RHSA SECOND_RHSA THIRD_RHSA    

and the script has to run as

yum -y -v update --advisory=FIRST_RHSA,SECOND_RHSA,THIRD_RHSA

I tried using array with character substitutions but it doesn't run correctly. Do you have an idea please?

thanks

intore
  • 399

1 Answers1

0
varbl="FIRST_RHSA SECOND_RHSA THIRD_RHSA"

yum -y -v update --advisory="${varbl// /,}"

You could use bash parameter substitution