yes mypassword | while true; do sudo -S sleep 3; sudo -k; donecan supply multiple identical stdin inputs
mypasswordto the while loop.When both
sudo -Sand the command it executes need different stdin input, is there any way to provide their stdin inputs?<how can I supply password to sudo and "hello" to cat respectively> | sudo -S catMore generally, if I know a command expects a number of different stdin inputs, how can I pipe the stdin inputs to it?
Thanks.