hfranco Asked: 2012-01-19 09:20:35 +0800 CST2012-01-19 09:20:35 +0800 CST 2012-01-19 09:20:35 +0800 CST Install packages through yum from file 772 Is there any way to install packages through yum from a file? Something like: yum -f packages.txt I couldn't find anything in the man pages. packages.txt would contain something like: bash bc binutils bzip2 bzip2-libs ca-certificates cairo linux yum 2 Answers Voted Best Answer Not Now 2012-01-19T09:29:12+08:002012-01-19T09:29:12+08:00 xargs yum -y install < filename warren 2012-01-19T09:30:17+08:002012-01-19T09:30:17+08:00 This works: yum install `cat <filename> | tr '\n' ' '` As should: yum install `cat <filename>` I added the pipe to tr as a sanity check, just in case the environment is wacky. per a comment: yum install $(cat <filename>) will also work, rather than using the backticks.
This works:
As should:
I added the pipe to
tr
as a sanity check, just in case the environment is wacky.per a comment:
will also work, rather than using the backticks.