Philip Rowlands <[EMAIL PROTECTED]> writes:

> There's the "base64" openssl applet, which can use argv[0]:
>
> $ ln -s /usr/bin/openssl base64
> $ echo "This is a test" | ./base64
> VGhpcyBpcyBhIHRlc3QK
> $ echo VGhpcyBpcyBhIHRlc3QK | openssl base64 -d
> This is a test

Right, although it doesn't have customizable line wrapping.  Nor is it
as standalone as most of the coreutils tools are...

Jim Meyering <[EMAIL PROTECTED]> writes:

>> Is a base64 encode/decode tool suitable for coreutils?
>
> As Padraig noted, GNU recode does this:
>
>   $ echo foo|recode ../64
>   Zm9vCg==
>   $ echo foo|recode ../64|recode /64
>   foo
>
> but I find the syntax to be obscure.
> And it's not always available.

Agreed.

FWIW, I have written a base64 tool to satisfy my needs.  It is based
on the coreutils code style.  If at some point in time, the need for a
base64 tool in coreutils arise, it should not be difficult to adapt my
implementation.

http://josefsson.org/base64/
http://josefsson.org/cgi-bin/viewcvs.cgi/base64/src/base64.c?view=markup

Thanks,
Simon


_______________________________________________
Bug-coreutils mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to