brew install $(cat packages.txt)
或者
brew install $(<packages.txt)
txt文件形如:
autoconf
autojump
automake
brew-cask-completion
coreutils
expect
fontconfig
freetype
gcc
gd
gdbm
gettext
gmp
gnuplot
hadoop
icu4c
isl
jpeg
libevent
libgpg-error
libksba
libmpc
libpng
libtiff
libtool
libyaml
lua
maven
maxima
mercurial
mpfr
node
openssl
openssl@1.1
pcre
pcre2
perl
pkg-config
python
python3
r
readline
rlwrap
ruby
scala
sqlite
tig
tmux
vim
webp
wget
wxmac
xz
zsh
zsh-completions