shell - How does git count submissions during a specified time period every day?
淡淡烟草味
淡淡烟草味 2017-05-02 09:34:25
0
2
601

For example: Statistics of submission records after 21:00 and before 5:00 am every day.
After consulting various documents and google, I used the stupidest method to achieve it:

git log --pretty=format:'%h %cn %cd %s' --date='format:%Y-%m-%d %H:%M:%S' | \
awk '{hour=0+substr(,0,2); if(hour>21 || hour<5) printf "%-10s %-15s %-12s %-10s %-10s\n", , , , ,  }'

But it doesn’t look elegant enough. I want to use date comparison in awk, but there are all kinds of pitfalls.
Is there a better way?

淡淡烟草味
淡淡烟草味

reply all(2)
我想大声告诉你

Why you must use shell+awk

php and python not working

小葫芦

Can use python

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template