I frequently used to run ‘mongo’ with --eval parameter, mostly in some automation scripts, for example simple ‘mongo --eval 1’ to see if mongod is already fully started.
When I try the same with mongosh the execution of command never ends. It prints some welcome information, then the literal ‘1’ and freezes. I can’t stop it by either ctrl+c, ctrl+d or ctrl+z. Only killing it from another shell helps.
IT is the same with any other command.
Is this something that you know about? Maybe I’m doing something wrong?