From: Junio C Hamano Date: Tue, 12 Jan 2021 22:34:16 GMT Subject: Re: [PATCH 10/22] mailmap tests: get rid of overly complex blame fuzzing Message-ID: In-Reply-To: <20210112201806.13284-11-avarab@gmail.com> Ævar Arnfjörð Bjarmason writes: > + 6 6 1 > + Santa Claus > + 7 7 1 > + CTO > + EOF > + > + git blame --porcelain one >actual.blame && > + grep -E \ > + -e "[0-9]+ [0-9]+ [0-9]+$" \ > + -e "^author .*$" \ > + actual.blame >actual.grep && > + cut -d " " -f2-4 actual.fuzz && An approach along the lines of ... NUM="[0-9][0-9]*" sed -n -e "s/^author //p" \ -e "s/^$OID_REGEX \($NUM $NUM $NUM\)$/\1/p" ... would allow you to drop "cut" and also not assume that names do not have more than 3 tokens.