We have a requirement to load a text file (fixed width file) to mongodb. We are trying to connect to remote mongodb (mongodb+srv://servername) from bash shell script which resides in AWS RHEL EC2. Below are the steps followed. But after doing that when I type mongo or mongosh it mentions as command not found(-bash: mongosh: command not found). Could you please let me know what is missing here?
Welcome to the MongoDB Community Forums @Shajila_KP!
It looks like you have installed the mongodb-mongosh package, so as @Fabio_Ramohitaj suggested you need to ensure the executables can be found in your $PATH variable.
If you have not set up any DNS entries for a self-hosted installation, you should be using the standard connection string format which will start with mongodb://.