Install packages through yum from file

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

xargs yum -y install < filename

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.