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
$(echo 'string with spaces' | /bin/tr ' ' ',')
is the string with spaces replaced by commas. – Ulrich Schwarz Jan 26 '18 at 14:35