On 2020-03-15 09:00, Assaf Gordon wrote:
Hello,
On 2020-03-15 12:12 a.m., Kaz Kylheku (Coreutils) wrote:
On 2020-03-14 22:20, Peng Yu wrote:
Python base64 decoder has the altchars option.
[...]
But I don't see such an option in coreutils' base64. Can this option
be added? Thanks.
# use %* instead of +/:
base64 whatever | tr '+/' '%*'
The reason for alternative characters is typically do use then in URLs,
where "/" and "+" are problematic.
A new command "basenc" was introduced in coreutils version 8.31
(released last year) which supports multiple encodings.
If your script has to work in installations that aren't up to
Coreutils 8.31, or don't use Coreutils at all (base64 comes from
somewhere else), you need the tr trick or its ilk.