How to pipe a 'yes' or 'y' into a program while invoked with 'sudo' in bash?
11
votes
1
answer
28109
views
How to pipe a
Y
or yes
to a program while invoking with sudo
?
We can type like this
yes | command
yes | yum update
How to pipe the y
from yes
into a program via sudo
like the following?
yes| sudo command
The y
from yes
is be passed into command
and should go into sudo
and sudo
shall ask for password normally. How can I do this?
Asked by Abhik Bose
(2138 rep)
Dec 15, 2017, 01:41 PM
Last activity: Dec 15, 2017, 09:52 PM
Last activity: Dec 15, 2017, 09:52 PM