Odrive: How to write shell script so that the commands are transferred to console open by tool in the same terminal?

I want to write a shell script which opens odrivetool first and then continue odrive commands to command line interface opened by odrivetool in same terminal. What would be the method for that ? When I place the commands as in picture, when the odrivetool opens its CLI in same terminal the next commands are not input in the odrivetool CLI.