mongodb 脚本操作

MO='mongo'
$MO << EOF
use testdb
db.dropDatabase()
show dbs
exit;
EOF

原文地址:https://www.cnblogs.com/ahuo/p/7602717.html