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: Alain D D Williams
Subject: Re: Cant get tr command to generate ROT5 or simple gematria
Date: Fri, 28 Apr 2023 06:48:41 +0100
User-agent: Mutt/1.10.1 (2018-07-13)

On Thu, Apr 27, 2023 at 11:15:00PM +0000, 
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 ?

Because 7 is not in the set 0-4 so it is not translated.

tr '0-4' '5-9' <<< 42

Yeilds '97' - as expected.

-- 
Alain Williams
Linux/GNU Consultant - Mail systems, Web sites, Networking, Programmer, IT 
Lecturer.
+44 (0) 787 668 0256  https://www.phcomp.co.uk/
Parliament Hill Computers. Registration Information: 
https://www.phcomp.co.uk/Contact.html
#include <std_disclaimer.h>



reply via email to

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