Wiki source for CommandBase64

Show raw source

=====Command base64=====

This command is part of the [[CommandsPosix posix]] extensions and needs to be imported to be available to the shell.
See [[CommandsPosix Posix Commands]]

**base64** encodes or decodes files to/from base64

base64 [options] [file]


||-w,-wrap||Wraps lines at 76 chars||
||-d,-decode||Decodes base64 (default, encode)||


Without -d, base64 encodes file (or stdin if no file specified) to base64 encoding and writes to stdout.
-w or -wrap specifies to wrap lines at 76 characters (encode only)

-d or -decode decodes instead of encodes and accepts either raw or wrapped base64 as input, and outputs the decoded file on stdout.


echo Hello | base64


echo Hello | base64 | base64 -d


base64 file.dat > file.b64

====Return Value====
Returns 0 if the command executed successfully, 1 if there was an error.
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki