#!/bin/sh mongo_path=$(cd $(dirname $(which mongo)) && pwd) now_path=$(cd $(dirname $0) && pwd) echo $mongo_path echo $now_path