GNU bug report logs - #23090
true and false not POSIX

Previous Next

Package: coreutils;

Reported by: Ruediger Meier <sweet_f_a <at> gmx.de>

Date: Tue, 22 Mar 2016 12:44:02 UTC

Severity: normal

Tags: notabug

Done: Eric Blake <eblake <at> redhat.com>

Bug is archived. No further changes may be made.

Full log


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

From: Bernhard Voelker <mail <at> bernhard-voelker.de>
To: Ruediger Meier <sweet_f_a <at> gmx.de>, Eric Blake <eblake <at> redhat.com>
Cc: 23090 <at> debbugs.gnu.org
Subject: Re: bug#23090: true and false not POSIX
Date: Tue, 22 Mar 2016 23:53:36 +0100
On 03/22/2016 07:35 PM, Ruediger Meier wrote:
>   echo 'int main(int argc, char **argv){return 0;}'> /tmp/true.c

coreutils' src/true.c does exactly that - unless the user passes
an argument:

  int
  main (int argc, char **argv)
  {
    /* Recognize --help or --version only if it's the only command-line
       argument.  */
    if (argc == 2)
      {
        ...
      }

    return EXIT_STATUS;
  }

So what's your point here? File size?  Well, on my openSUSE system
/usr/bin/true needs 27328 bytes.  Compared to the 6-7K your minimal
example above result in (compiled with -O2 -g, then stripped), I'd
consider this neglectable for nowadays' RAM and disk sizes.

Re. '/usr/bin/[' --help:
I'm using it myself from time to time, as I like the terse
information there.

Have a nice day,
Berny




This bug report was last modified 9 years and 60 days ago.

Previous Next


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