There is a program like this:
while true
do
echo 'Your pass: '
read password
if [ $password == 'qwerty' ]; then
echo 'Nice!'
break
fi
done
I can use xargs only if the program has arguments. But in this case ./program.sh password doesn't work.
I have a list of password and I need to send them in loop to this program.
xargs -a list ./program.sh doesn't work.