When I use sudo command
and pipe it to another command, e.g.
sudo dnf search foo | grep bar
there is a prompt requiring to enter the password. Following this answer, sudo
directly accesses the terminal to prompt the password.
But I found that there are some programs which prevent that, for example ripgrep
, when I type:
sudo dnf search foo | rg bar
there is no prompt for password, it's just blocked there.
How can this happen?