我想编写一个脚本,使重新安装软件包更加容易,但不确定如何在命令末尾指定输入。到目前为止,我已经有了。
#!/bin/bash
## Need someway to specify input
sudo dpkg --set-selections <
## Need someway to specify input here too
sudo debconf-set-selections <
sudo apt-get -y update
## dselect-upgrade gave me issues
## if dselect not installed then install it
sudo apt-get dselect-install
exit 0
有小费吗?