如何通过shell脚本操作MongoDB
生活随笔
收集整理的這篇文章主要介紹了
如何通过shell脚本操作MongoDB
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
?
通過shell腳本對MongoDB進行自動化操作
運行寫好的 ./show.sh 腳本?發現能夠建立mongo鏈接
#!/bin/sh mongo WordPress --eval "show collections;db.posts.find().limit(10);"或者把mongo作為shell解析器:
#!/usr/bin/env mongo WordPress show collections db.posts.find().limit(10)轉載于:https://www.cnblogs.com/sea-stream/p/10083067.html
總結
以上是生活随笔為你收集整理的如何通过shell脚本操作MongoDB的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Chisel 学习笔记(四)
- 下一篇: alpha总结