[exim] The evaluation of ${nhash{8}{64}{supercalifragilisti…

Top Pagina
Delete this message
Reply to this message
Auteur: Regid Ichira
Datum:  
Aan: exim-users
Onderwerp: [exim] The evaluation of ${nhash{8}{64}{supercalifragilisticexpialidocious}}

  Can you show how does ${nhash{8}{64}{supercalifragilisticexpialidocious}} evalute
6/33?  I mean, should I take 115 == 's'? What should I do next? And so on.

$ zgrep -A18 '${nhash{<string1>}{<string2>}{<string3>}}' /usr/share/doc/exim4/spec.txt.gz
${nhash{<string1>}{<string2>}{<string3>}}

    The three strings are expanded; the first two must yield numbers. Call them
    <n> and <m>. If you are using fixed values for these numbers, that is, if <
    string1> and <string2> do not change when they are expanded, you can use
    the simpler operator notation that avoids some of the braces:

    ${nhash_<n>_<m>:<string>}

    The second number is optional (in both notations). If there is only one
    number, the result is a number in the range 0-<n>-1. Otherwise, the string
    is processed by a div/mod hash function that returns two numbers, separated
    by a slash, in the ranges 0 to <n>-1 and 0 to <m>-1, respectively. For
    example,

    ${nhash{8}{64}{supercalifragilisticexpialidocious}}

    returns the string "6/33".

$