bug-coreutils
[Top][All Lists]
Advanced

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

Re: [PATCH][RFC] New 'true' program


From: Andreas Schwab
Subject: Re: [PATCH][RFC] New 'true' program
Date: Sat, 20 Nov 2004 17:39:52 +0100
User-agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3.50 (gnu/linux)

address@hidden (James Youngman) writes:

> On Fri, Nov 19, 2004 at 10:20:58PM -0800, Paul Eggert wrote:
>
>> If small size is all you want, I can do a lot better than that:
>> 
>> $ ls -l true
>> -rwxr-xr-x  1  eggert  eggert  10  2004-11-19 22:18  true
>> $ ./true; echo $?
>> 0
>> 
>> (The 10-byte implementation is left to the reader.  :-)
>
> Well, there's this alternative:-
>
> address@hidden:~$ touch true
> address@hidden:~$ chmod +x true
> address@hidden:~$ ./true
> address@hidden:~$ echo $?
> 0
> address@hidden:~$ ls -l true
> -rwxr-xr-x  1 james users 0 Nov 20 10:24 true
> address@hidden:~$

This is not necessarily the best one.

$ time ./true
0.00user 0.00system 0m0.02selapsed 9.60%CPU
$ time /bin/true
0.00user 0.00system 0m0.00selapsed 100.00%CPU

Andreas.

-- 
Andreas Schwab, SuSE Labs, address@hidden
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."




reply via email to

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