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

posted @ 2013-12-31 14:19  李波的博客  阅读(94)  评论(0编辑  收藏  举报