我正在使用以下命令显示提交信息,
awk 'BEGIN{srand()}
{n=split($1,a," ");
m=split($2,b," ");
printf "%s\t",$1;
for (i=1;i<=m;i++)
printf "%d%c", a[int(rand() * n) +1], (i == m) ? "\n" : " "
}' FS=\\t input
结果如下:
git log --graph --date=format:%Y-%m-%d\ %H:%M:%S --pretty=format:"%C(yellow)%h %Creset%cd%C(auto)%d %Creset%s" --all --oneline --simplify-by-decoration
我想按如下所示显示日期,该怎么办?
* 5c3c4c0 (HEAD -> devBranch1, origin/devBranch1) Merge remote branch 'devBranch1' into devBranch1
| * 60d9558 (origin/devBranch2) modify
|/
* df49eb7 (devBranch2) test