如何通过shell脚本操作MongoDB_百度知道
最佳答案: 您好. #!/bin/sh mongo WordPress --eval "show collections;db.posts.find().limit(10);" show collections db.posts.find().limit(10) 通过...
如何通过shell脚本操作MongoDB_百度知道
最佳答案: 用过echo加管道符将命令传入mongo的命令行 echo "db.serverStatus().mem" | mongo admin -u$user -p$pw 如果是多条命令 mongo admin -u$user -...更多关于如何通过shell脚本操作MongoDB的问题>>