Pass input to interactive command line program in bash [duplicate] Pass input to interactive command line program in bash [duplicate] linux linux

Pass input to interactive command line program in bash [duplicate]


I'm guessing this will work, but it's only a guess since we don't know how your program is reading the responses: use a here-doc, and put the input for command B after invoking command B

example_program <<'END'command_Acommand Binput_herecommand CEND