Install multiple homebrew formulas at the same time

Jonathan picture Jonathan · Nov 4, 2014 · Viewed 9.2k times · Source

You can install multiple homebrew formulas by brew install package1 package2. But if you have a text file with all the packages that you would like to install. How would you do it?

brew install < packages.txt doesn't work. It gives me the response: This command requires a formula argument

Answer

Mark Setchell picture Mark Setchell · Nov 4, 2014

Like this:

brew install $(cat packages.txt)

or even just

brew install $(<packages.txt)