I'm executing uninstall.sh in within bash script which access two std inputs, "yes" and it executes some steps, and then another "y" for to execute another steps as confirmation.
Tried using here doc option as below:
./uninstall.sh <<"EOF"
yes
y
EOF
or
./uninstall.sh <<EOF1 <<EOF2
yes
EOF1
y
EOF2
but it only accepts yes and first stdin and for seconds, it does not take "y" as input, giving below error:
java.util.NoSuchElementException: No line found
What I'm missing here ?