Hacker News new | ask | show | jobs
by sirsuki 3058 days ago
For the curious, The J. Caesar quote "L xvh wklv dss hyhubgdb, dqg L oryh lw!" can be decoded with the following command:

echo 'L xvh wklv dss hyhubgdb, dqg L oryh lw!' | tr '[D-ZA-Cd-za-c]' '[A-Za-z]'

https://en.wikipedia.org/wiki/Caesar_cipher

Well played @tsucres. Well played.

1 comments

The square brackets in your tr invocation are unnecessary.
Doesn’t that depend on wether you’re using a GNU tr or a BSD variant? I feel like the brackets were necessary back in the day.