我有一台主机和一台矿工。矿工正在尝试使用 setselections 和 get-selections安装一个名为packages.txt
via 的文件,我尝试了一些 sudo 之类的方法,但都不起作用。dpkg
<($ cat packages.txt)
apt-get install $(grep -vE "^\s*#" filename | tr "\n" " ")
http://rs375.pbsrc.com/albums/oo199/Darlok1983/20170316_120956_zpszwupoe4r.jpg?w=280&h=210&fit=crop
答案1
#! /bin/bash
for i in $(cat ~/Desktop/install.txt)
do
if [ $i != "install" ]
then
dpkg -i /location/$i #or any other command...
fi
done