> On 11 Oct 2016, at 03:09, Torsten Bögershausen <tboegi@xxxxxx> wrote: > > On Tue, Oct 11, 2016 at 10:11:22AM +0200, Lars Schneider wrote: >> >>> On 10 Oct 2016, at 21:58, Junio C Hamano <gitster@xxxxxxxxx> wrote: >>> >>> larsxschneider@xxxxxxxxx writes: >>> >>> [...] >>>> >> -test_cmp_count_except_clean () { >> - for FILE in $@ > >> +test_cmp_count () { >> + expect=$1 actual=$2 > > That could be > expect="$1" > actual="$2" Sure! >> + for FILE in "$expect" "$actual" >> do > >> + sort "$FILE" | uniq -c | sed "s/^[ ]*//" | >> + sed "s/^\([0-9]\) IN: clean/x IN: clean/" | >> + sed "s/^\([0-9]\) IN: smudge/x IN: smudge/" >"$FILE.tmp" && >> + cat "$FILE.tmp" >"$FILE" > > How about > cp "$FILE.tmp" "$FILE" OK, I'll use "mv". Thanks, Lars