I want this command to work silently,
echo "any_password" | sudo -S true
I tried redirecting the output of stdout and stderr to
/dev/null. When I provide the correct password it works as expected, but when the password is incorrect I still see some error on the screen.
echo "incorrect_password" | sudo -S true > /dev/null 2>&1
Sorry, try again.
The output was only partially suppressed. Is there a way to suppress it completely?