List all MongoDB databases from Linux bash terminal
"show dbs" calculate the databases sizes and that may take some time.
You can pass this command to the mongo shell, then clean the response:
echo "db.getMongo().getDBNames()"|mongo --quiet |tr -d \[\] | tr , "\n"|cut -c3-| tr -d \"