Monthly Archives: July 2012

mongoDB query: is not null and compare two field values

db.user.find({campaign:{$exists:true},’order.discount’:{$ne:null},$where:function() {return this.order.discount.code != this.campaign.offer.coupon} })

Posted in mongodb | Leave a comment

awk commands

awk -F’\t’ ‘BEGIN{initialization}{for every line}END{postprocessing}’ inputfile

Posted in awk | Tagged | Leave a comment