I set up a pipe returning the name of a package I'd like to install using
... | xargs -I _ sudo apt install _
apt-get can't read from stdin in this case and exits with:
Do you want to continue? [Y/n] Abort.
I know about the
-y flag to install the package without user confirmation, but I'd like to actually see the confirmation.
Is there a way to forward the package name to
apt-get while still allowing it to read from stdin?
apt-get on the left side of the whole command is not an option since I don't want
apt-get to be executed if an ealier command in the pipe is aborted, using the
set -o pipefail option.