代码块
#!/bin/bash
# 日期时间
start=`date +%Y%m%d-%H:%M`
# 时间戳秒
startTimestamp=`date +%s`
for i in {1..500}
do
echo $i
# --no-pager全部一次性的不分页不分屏输出日志
git --no-pager log --date=iso-local --pretty=format:'%ad %H %an %B'
done
end=`date +%Y%m%d-%H:%M`
endTimestamp=`date +%s`
sumTime=$[ $startTimestamp- $endTimestamp]
echo "$start ---> $end" "Total:$sumTime seconds"```