GNU bug report logs - #6020
coreutils-8.x: a simple feature enhancement, and how to do it

Previous Next

Package: coreutils;

Reported by: "Nelson H. F. Beebe" <beebe <at> math.utah.edu>

Date: Sat, 24 Apr 2010 01:31:01 UTC

Severity: normal

Fixed in version 8.6

Done: Pádraig Brady <P <at> draigBrady.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Jim Meyering <jim <at> meyering.net>
To: Pádraig Brady <P <at> draigBrady.com>
Cc: Erik Auerswald <auerswal <at> unix-ag.uni-kl.de>, 6020 <at> debbugs.gnu.org, "Nelson H. F. Beebe" <beebe <at> math.utah.edu>
Subject: bug#6020: coreutils-8.x: a simple feature enhancement, and how to do it
Date: Thu, 29 Apr 2010 11:04:50 +0200
Pádraig Brady wrote:
> On 29/04/10 07:26, Erik Auerswald wrote:
>> Hi,
>>
>> two nit-picks regarding the test script below:
>>
>> On Thu, Apr 29, 2010 at 12:39:46AM +0100, Pádraig Brady wrote:
>>> [...]
>>> @@ -0,0 +1,51 @@
>>> +#!/bin/sh
>>> +# Ensure sort -g sorts floating point limits correctly
>>> [...]
>>> +if test "$VERBOSE" = yes; then
>>> +  set -x
>>> +  mv --version
>>      ^^
>>      sort
>> would be nicer.
>
> Heh, I noticed that :)
>
>>> +# See if sort should be using long doubles
>>> +grep '^#define HAVE_C99_STRTOLD 1' $CONFIG_HEADER > /dev/null ||
>>                                                      ^^^^^^^^^^^
>>                                                      -q
>> would be more concise.
>
> and efficient (it exits on first match).

When efficiency is important, sometimes I've used -l. (e.g., in maint.mk)
That is portable and also makes grep stop searching upon first match.
However, you'd probably still want to redirect its stdout.
Useful when grep would otherwise search much more or
generate much more output.

> However, even though POSIX specifies -q, it's not portable.
> Solaris' grep for example, does not support -q.
> We'll start using it at some stage though.
>
> My latest patch is attached which corrects the info docs
> to mention strtold() not strtod().

Thanks for writing that.




This bug report was last modified 15 years and 83 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.