[lkml]   [2003]   [Mar]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: BK-kernel-tools/shortlog update
    On Wed, Mar 26, 2003 at 09:21:22AM -0800, Linus Torvalds wrote:
    > Btw, one feature I'd like to see in shortlog is the ability to use
    > regexps for email address matching, ie something like
    > 'torvalds@.*' => 'Linus Torvalds'
    > ...
    > 'alan@.*' => 'Alan Cox'
    > ...
    > I don't know whether you can force perl to do something like this, but if
    > somebody were to try...

    My perl-incantation wizard friend (I consider myself mere journeyman)
    uses usually convoluted 'map' constructs to do things like this.
    It is amazing high-power way to make things -- and often helps you to
    make "write only" script.

    Wrapping converter regular expressions into map {} structure gives
    something like:

    @summary = map {
    s/torvalds\@.* Torvalds/,
    s/alan\@.* Cox/,
    ... etc ...
    } @summary;

    See "man perlfunc" and look for " map ".

    > Linus

    /Matti Aarnio
    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-03-22 13:34    [W:0.028 / U:0.040 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site