I have a bash script say test.sh
and while executing manually say sh test.sh
. First it will ask y/n
,then if I give yes,again it will ask y/n
and on the second yes, it will ask me to give a server host-name
and once I give the host-name again it asks for a series of y/n
and finally it will be successfully completed. I am curious to know how to automate like a silent installation.
I tried echo y | sh test.sh...
But the issue with this is that for the server host-name also it is giving y