If Linux command has single prompt then we can handle it like following -
echo "password" | sudo -S ls
But startWebLogic.sh
has two prompts, one for username and other for password to boot WebLogic server.
I tried with following
sh startWebLogic.sh << EOF
> user
> password
> EOF
but it end up with
<Aug 31, 2020 7:04:59 PM GMT> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to FORCE_SHUTTING_DOWN.>
Stopping Derby server...
Derby server stopped.
Can you please suggest how I can pass two arguments of prompt in single command?