mongodb mapreduce示例

#!/bin/bash
mongo $1 <<EOF!
db.$2.distinct('_id',{cip_name:"cip2",dc_iplist:"10.1.10.180:30000,10.1.11.188:30000,10.1.12.189:30000"})
exit;
EOF!

  ./222.sh db_name collection >coll.txt

原文地址:https://www.cnblogs.com/mytech/p/3499396.html