File tree Expand file tree Collapse file tree 4 files changed +6
-6
lines changed
Expand file tree Collapse file tree 4 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 99# * `awk '{}'`
1010# - From each date line, extract the weekday (`$2`).
1111# * `sort`
12- # - Sort in alphabetical order.
12+ # - Sort in lexicographic order.
1313# * `uniq -c`
1414# - Remove repeated lines and count the repeats to show weekday totals.
1515# * `awk '{}'`
Original file line number Diff line number Diff line change 99# * `awk '{}'`
1010# - From each date line, extract the year (`$6`).
1111# * `sort -r`
12- # - Sort in reverse order.
12+ # - Sort in reverse lexicographic order.
1313# * `uniq -c`
1414# - Remove repeated lines and count the repeats to compute yearly totals.
1515git log | grep Date | awk ' {print $6}' | sort -r | uniq -c | awk ' {print $2 OFS $1}'
Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22#
3- # List contributors in alphabetical order.
3+ # List contributors in lexicographic order.
44
55# * `git shortlog -sne`
66# - Generate a log summary with commit counts.
77# * `cut -f 2`
88# - Keep everything on the line starting from the second column.
99# * `sort`
10- # - Sort in alphabetical order.
10+ # - Sort in lexicographic order.
1111git shortlog -sne | cut -f 2 | sort
Original file line number Diff line number Diff line change @@ -46,11 +46,11 @@ rank() {
4646 # * `grep "$1"`
4747 # - Filter file paths using a provided filter.
4848 # * `sort`
49- # - Sort in alphabetical order.
49+ # - Sort in lexicographic order.
5050 # * `uniq -c`
5151 # - Remove and count repeats.
5252 # * `sort -r`
53- # - Sort in reverse order such that higher counts come first.
53+ # - Sort in reverse lexicographic order such that higher counts come first.
5454 # * `head`
5555 # - Only show a specified number of files.
5656 git log --all -M -C --name-only --format=' format:' | grep -v ' ^$' | grep " $1 " | sort | uniq -c | sort -r | head -n " $2 "
You can’t perform that action at this time.
0 commit comments