[lkml]   [2005]   [May]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: Mercurial 0.4b vs git patchbomb benchmark
    On May 2, 2005, at 12:31:06, Linus Torvalds wrote:
    > That said, I think the /usr/bin/env trick is stupid too. It may be
    > more
    > portable for various Linux distributions, but if you want _true_
    > portability, you use /bin/sh, and you do something like
    > #!/bin/sh
    > exec perl "$@"

    Oooh, I can one-up that hack with this evil from perlrun(1):

    #!/bin/sh -- # -*- perl -*- -W -T
    eval 'exec perl -wS $0 ${1+"$@"}'
    if 0;

    Perl ignores the eval($string) because of the "if 0" in the
    statement. The
    shell sees the statement end at the newline, and executes it faithfully.
    The end result is that the preferred Perl gets the script. I don't know
    Python, so I don't know if such a trick exists there.

    Kyle Moffett

    Version: 3.12
    GCM/CS/IT/U d- s++: a18 C++++>$ UB/L/X/*++++(+)>$ P+++(++++)>$
    L++++(+++) E W++(+) N+++(++) o? K? w--- O? M++ V? PS+() PE+(-) Y+
    PGP+++ t+(+++) 5 X R? tv-(--) b++++(++) DI+ D+ G e->++++$ h!*()>++$
    r !y?(-)
    ------END GEEK CODE BLOCK------

    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2005-05-02 23:24    [W:0.049 / U:148.284 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site