These days many programs like mongodb, docker etc, have there own shell i.e., if you type docker -i
it opens an interactive shell (similarly with mongo and other programs).
Is there a way to automate input to these shells via Uunix shell scripts? Or any other way a Unix shell could communicate with the shells of these programs?
docker
doesn't really have it's own shell. It just executes bash inside of the container. Formongodb
, use the CLI client or a library. If you have something where all other options are exhausted, as a last resort you can useexpect
. – jordanm May 10 at 2:11