shell version of over complicated marmalde-mongo.el