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 <[email protected]> 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 > >
