automate responses on command prompt

Is there any way to automate the installation of this software using shell script? The problem is that I have to press ENTER and type YES twice and I am not sure how to use these 4 steps.



When I run the command mentioned above, I have these 4 steps:

 press ENTER
 type YES
 press ENTER
 type YES

I want to add this installation as a shell script in docker file or (if possible) directly in dockerfile.

2 answers

  • answered 2020-07-05 02:12 Gilles Quenot

    Like this:

    chmod +x
    ./ -b 

    (batch mode).


    ./ -h

    -b run install in batch mode (without manual intervention), it is expected the license terms are agreed upon

  • answered 2020-07-05 02:22 SomeUsername1

    You could use the functions expect & send from the package expect.

    Man Page
    Answer found here