GNU bug report logs - #7877
sleep takes undocumented hex args

Previous Next

Package: coreutils;

Reported by: jidanni <at> jidanni.org

Date: Fri, 21 Jan 2011 00:09:02 UTC

Severity: normal

Done: Jim Meyering <jim <at> meyering.net>

Bug is archived. No further changes may be made.

Full log


Message #58 received at 7877 <at> debbugs.gnu.org (full text, mbox):

From: Jim Meyering <jim <at> meyering.net>
To: jidanni <at> jidanni.org
Cc: 7877 <at> debbugs.gnu.org
Subject: Re: bug#7877: sleep 5 -4
Date: Tue, 25 Jan 2011 09:36:40 +0100
jidanni <at> jidanni.org wrote:
> $ sleep 5 -4
> sleep: invalid option -- '4'
> $ sleep -- 5 -4
> sleep: invalid time interval `-4'
>
> No fair prejudicing negative numbers.
>
> At least document it.
> 'However, GNU `sleep' accepts arbitrary floating point numbers (using a
> period before any fractional digits).' is what it says on Debian.

Hi Dan,

GNU sleep requires nonnegative numbers, so I've mentioned that
in the texinfo documentation.  I nearly made the s/arbitrary/nonnegative/
change to the sentence in both --help and coreutils.texi:

    Unlike most implementations that require NUMBER be an integer,
    here NUMBER may be an arbitrary floating point number.

But that seemed counterproductive, since we're making the contrast
between integer and FP.  Adding "nonnegative" there would detract.

Other implementations accept only a single argument,
so negative numbers would not make sense.


From 228b7b3c85b85a14b702aac1642b931798916809 Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering <at> redhat.com>
Date: Tue, 25 Jan 2011 09:22:37 +0100
Subject: [PATCH] doc: mention that each sleep argument must be nonnegative

* doc/coreutils.texi (sleep invocation): Document that arguments
must be nonnegative.  Reported by Dan Jacobson.
---
 doc/coreutils.texi |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/doc/coreutils.texi b/doc/coreutils.texi
index ebe379e..398e20c 100644
--- a/doc/coreutils.texi
+++ b/doc/coreutils.texi
@@ -15674,7 +15674,7 @@ sleep invocation
 @end example

 @cindex time units
-Each argument is a number followed by an optional unit; the default
+Each argument is a nonnegative number followed by an optional unit; the default
 is seconds.  The units are:

 @table @samp
--
1.7.3.5.38.gb312b




This bug report was last modified 14 years and 119 days ago.

Previous Next


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