coreutils
[Top][All Lists]
Advanced

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

Re: Cant get tr command to generate ROT5 or simple gematria


From: Michael Cook
Subject: Re: Cant get tr command to generate ROT5 or simple gematria
Date: Fri, 28 Apr 2023 05:39:22 -0400

For "47" there's no "7" in tr's first argument "0-4".
So, tr is going to leave the "7" unchanged (but will change the "4" to "9")
resulting in the output "97".

Looks like you want `tr 0-9 5-90-4`?

On Fri, Apr 28, 2023 at 1:29 AM <outboundessentialconnection@firemail.cc>
wrote:

> So I can't understand why I can't get tr to output ROT5:
>
> 01234
> 56789
>
> tr '0-4' '5-9' <<< 47 = 97 not 92 ?
>
>
> Also when trying to do Simple Gematria where each letter of alphabet is
> equal to A=1 and Z=26. I can't get this to work:
>
> tr 'A-Za-z' '1-26' <<< coreutils = 666666666
>
> When it should be 122
>
> is this cause tr is limited to 0-9 and cant do double or triple digits?
>
> Could support for double or tripple digits be added?
>
>
> Thanks
>
>


reply via email to

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