When issuing commands that require a prompt midway (eg apt install
), the prompt immediately aborts, as such:
self@localhost:~$ sudo apt install xterm
Reading package lists... Done
Building dependency tree
Reading state information... Done
After this operation, 2,023 kB of additional disk space will be used.
Do you want to continue? [Y/n] Abort.
self@localhost:~$
I've heard that this happens because applications are unable to read from stdin. So that's an issue.
I know that for apt, I can pass -y
to skip the prompt. What can I do for other programmes that requires prompts but that provide no such option? What could possibly be causing this?
bash
thenexit
will fix the issue. Still, no idea what causes it. – snazzybouche Aug 07 '19 at 12:01ls -l $(tty) ; lsof -V $(tty)
in your question ? – X Tian Aug 07 '19 at 12:31cat
at the prompt do? – Aug 07 '19 at 13:59