bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] df: new option: --total (-c) to produce grand total (in the


From: Jim Meyering
Subject: Re: [PATCH] df: new option: --total (-c) to produce grand total (in the same way as du)
Date: Tue, 02 Sep 2008 16:56:06 +0200

Andreas Schwab <address@hidden> wrote:

> Jim Meyering <address@hidden> writes:
>
>> diff --git a/tests/df/total b/tests/df/total
>> index be4bc19..5398deb 100755
>> --- a/tests/df/total
>> +++ b/tests/df/total
>> @@ -29,12 +29,12 @@ fail=0
>>  umask 22
>>
>>  df > tmp || fail=1
>> -grep ^total tmp && fail=1
>> +grep '^total' tmp && fail=1
>
> This will fail if you happen to have an nfs mount from a host named
> total.

Good point.
We can fix it and make the regexp tighter at the same time:

  $EGREP '^total( +(-?[0-9]+|-)){3} +-?[0-9]+%$'




reply via email to

[Prev in Thread] Current Thread [Next in Thread]