How can I send a command like following, but with default parameters (without user input). I want to use this in a shell script.
dpkg --configure -a ...
==> Modified (by you or by a script) since installation. ==> Package
distributor has shipped an updated version. What would you like to
do about it ? Your options are:
Y or I : install the package maintainer's version
N or O : keep your currently-installed version
D : show the differences between the versions
Z : start a shell to examine the situation The default action is to keep your current version.
*** CONFIGFILE (Y/I/N/O/D/Z) [default=N] ? ^C
dpkg --configure -a < standardresponse.txt
? That would be my first try..bashrc
or.bash_aliases
file. E.g.alias confpack='dpkg --configure -a' . After you source yr
.bashrc` fileconfpack
would then become yr new shortcut cmd. Sorry if I got yr question wrong.