#!/bin/shif [ $# -lt 2 ]then echo "[usage]: ./get_date_by_changeId [PRoject_location] [changeId]" exit 1fi#func get the date line by changeIdget_date_by_changeId(){ CURRENT_PATH=`pwd` cd $1 git log --grep="$2" --pretty="%ad" --date=rfc if [ $? ] then cd $CURRENT_PATH return 1 else cd $CURRENT_PATH return 0 fi}DATE_CHANGED=`get_date_by_changeId $1 $2`if [ -n "$DATE_CHANGED" ]then echo "$DATE_CHANGED"fi