> On 11 Oct 2016, at 03:09, Torsten Bögershausen <tbo...@web.de> wrote:
> 
> On Tue, Oct 11, 2016 at 10:11:22AM +0200, Lars Schneider wrote:
>> 
>>> On 10 Oct 2016, at 21:58, Junio C Hamano <gits...@pobox.com> wrote:
>>> 
>>> larsxschnei...@gmail.com 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

Reply via email to