bug-coreutils
[Top][All Lists]
Advanced

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

bug#23090: true and false not POSIX


From: Bernhard Voelker
Subject: bug#23090: true and false not POSIX
Date: Tue, 22 Mar 2016 23:53:36 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0

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





reply via email to

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