replace true(1) and false(1) with simple shell scripts

Peter Avalos pavalos at theshell.com
Sat Mar 18 23:54:23 PST 2006


On Sat, Mar 18, 2006 at 11:26:55PM -0800, David Cuthbert wrote:
> Jake Maciejewski wrote:
> >I checked other *NIX distros. NetBSD and OpenBSD use shell scripts,
> >Solaris uses C but with _exit() before the return statement, and GNU
> >uses a C program, but I haven't checked the source.
> 
> Well, as long as we're bikeshedding and optimizing the pointless... ;-)
> 
> % cat true.s
>         .text
>         .globl _start
>         .type _start, @function
> 
> _start:
>         pushl $0
>         pushl $0
>         movl $1, %eax
>         int $0x80
> 
> 
> % cat false.s
>         .text
>         .globl _start
>         .type _start, @function
> 
> _start:
>         pushl $1
>         pushl $0
>         movl $1, %eax
>         int $0x80
> 

Lose the whitespace, color it green, and we have ourselves an
improvement!


Attachment:
pgp00001.pgp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pgp00001.pgp
Type: application/octet-stream
Size: 191 bytes
Desc: "Description: PGP signature"
URL: <http://lists.dragonflybsd.org/pipermail/submit/attachments/20060318/56ecdce8/attachment-0017.obj>


More information about the Submit mailing list