I need a script in order to, giving a packages list as arguments, the script performs the installation of the packages in one row. For example launching the script in this way:
script package1 package2 package3
it performs the installation in this way:
yum -y install package1 package2 package3
Clearly I'm in a situation in which I can't install them directly but I need to use a script. How could I do? This way install the packages in different rows and is not what I need.
for pkg in "$@" do yum -y install "$pkg" done