Christopher Kerr wrote:
> After being burned by using `head -c6 /dev/urandom | base64` as part of a 
> directory name, I realised that it would be useful if base64 had an option to 
> generate URL and Filename safe encodings, as specified in RFC 3548 section 4.
> 
> This would make
> cat FILE | base64 --filename-safe
> equivalent to
> cat FILE | base64 | tr '+/' '-_'

Not a bad idea. I've needed stuff like that before:
http://www.pixelbeat.org/libs/base64.c

Perhaps `tr '+/' '._'` would be better so that
you don't need to worry about "-" at the start of a filename?

Pádraig.


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

Reply via email to